I installed Apache, MySQL, PHP, and phpmyadmin, and I did everything needed to make the localhost/phpmyadmin webpage work correctly, with the two user inputs, I remember making my password and username 'root', when I try to log in, I get the error in the title. I've have been searching for an hour for a solution, but nothing has worked for me, please someone help, this is so frustrating! Thanks in advance
PS. I also installed 'xampp' to start and stop mysql server (that's all I know how to use it for)
I assume you have not been able to put any valid data into your MySQL database. Therefore
you should definitely remove Apache, MySQL, PHP, and phpmyadmin, plus XAMPP; then restart your machine and install just XAMPP.
Getting all the necessary parts working together is tricky, that's why there are packages like XAMPP that do the work for you.
So you haven't managed to connect to the MySQL server through php myadmin, just get to the login screen?
The way you have phrased you question makes it sound like you've installed MySQL and php seperatly from xampp, is this the case as I believe that xampp comes with it's own versions?
You are on windows??
Related
I'm trying to create a dynamic drop down list by requesting data from my database using MAMP.
One of the tutorials I have tried has been talked about already and my version of the code is the same. Dynamic dropdown list with PHP & MYSQL
Although I am under the impression MAMP has a SQL server, I thought the problem was because I didn't have MySQL installed on my computer so I downloaded it, to no avail.
I went into my Task Manager and tried looking for "MySQL service" although I couldn't find the exact tag I did see MySQL Writer is running, but the Browser and Agent INFLOW is not and refuse to start.
I went here into my computer ( c://windows/system32/drivers/etc.host ) and took off the #s that were before
127.0.0.1 localhost
::1 localhost
making sure each remained on a separate line, I restarted my computer but I still can't seem to connect.
Any suggestions on how I may be able to fix this? I am extremely new to PHP and even newer to MySQL so, if possible, please try to keep any solutions simplified so I can follow along.
Not sure what the issue actually was but I ditched MAMP and installed XAMPP and everything seems to be working now.
Or is php 5.4 only compatible with mysql? I've been having some problems getting my php to work with mysql.
I'm using PHP 5.6.6, Apache 2.4, MySQL 5.6.23. My PHP and Apache work just fine. I created a website using CSV. I wanted to learn how to use MySQL, but I was having problems trying to get MySQL to work with my PHP. Now, I have never take any courses on MySQL nor have I ever used. The only thing I have done with MySQL is install it from the community tab from the MYSQL download page. I followed all the instruction and set my file path to be C:\mysql, and my data path to be C:\mysqldata, but I don't know, why it doesn't seem to work with my php when I try to connect. Is there another step I have to take to connect? I know a lot of people use WAMP, which is something I might look into if I don't get this working, but If there's anyone who has installed all three (apache php and mysql) sperately, know what my problem might be, I'll really appreciate it.
PDO works on all PHP versions 5.1+, which is the preferred method to connect to MySQL.
Total beginner to the world of MySQL and PHP (using MAMP).
Very simple question which I can not seem to find the answer to anywhere.
I have created a MySQL database (called user_info) in terminal under the 'root' user on 'localhost' with all permissions/privileges granted, when I access PhpMyAdmin as root user on localhost (which is what it says under the database server pane) I can't see the database I created in terminal in the left hand pane or under the databases tab of PhpMyAdmin ?
The question is really whether the databases created in terminal should reflect in the databases section in PhpMyAdmin or is this a total mis-understanding of the way it all works on my part ?
Any advice or explanation would be greatly appreciated !
Kind regards
It looks like you have two MySQL installations on your Mac. MAMP comes with MySQL and it looks like you also installed another MySQL outside of MAMP. This explains the two different data directories -- the MAMP MySQL is using /Applications/MAMP/db/mysql/ and the other installation is using 'usr/local/mysql/data/`.
Pick one to keep and remove the other one. You can force your client to connect to whichever one you want, by specifying the port or socket each one is using to listen for connections, but unless you have a specific reason for wanting to run two MySQL instances, it's going to be less confusing to remove one. Just make sure you don't have any stored data that you wish to save (or export/dump it to SQL first).
I came across the same issue when playing with MAMP.
And I finally find out that I have two MySQL installations on my Mac, just like Issac said.
One is installed individually, under /usr/local/mysql, and the other is installed together with MAMP, under /Applications/MAMP/Library/bin
So to see what is seen in phpmyadmin, I need to connect with the MAMP one.
hope this helps.
So basically I've created a MYSQL database that holds information about a gaming server player information, it's loaded into this PHP website that I created just 2 days ago (I'm completely new to PHP, I only started experimenting on it 2 days ago). So I had it all fixed up but on a localhost, it could fetch the data from the mysql database but only in the localhost, today I wanted to host a free mysql hostname is: fdb3.runhosting.com username: 1141497_damagedz and ofcourse I know the password. But when I'm trying to type this in via my PHP code in the db_connect line it gives me error saying it fails to connect at line 13 which is the line of $db_connect line, before it did work under the localhost but just now it doesnt work because I've deleted 3 files from xampp but surely that shouldnt matter now since its hosted on a whole different place like fdb3.runhosting.com ??
Also I'm using Adobe Dreamweaver to make the PHP website, before I just had to type in
http://localhost/tester.php
to open up my tester.php website that I've been working on, but now after I deleted the xampp it wont open this so I can't really tell what I'm doing or does it work or not, this is after I deleted my xampp, which is after I deleted my 3 files from xampp. So you can see i'm really confused and I do not know how to fix this at all, I don't know why db_connect at php gives me errors when clearly my fdb3.runhosting.com mysql database works just fine... I've created tables there too. Also how may I run my tester.php file without the localhost? Please tell me I'm really confused and really need help, thank you!
"I've deleted 3 files from xampp but surely that shouldnt matter"
Which 3 files and how do you come to that conclusion? Everything you say tends to indicate the reverse to be true!
Re-install XAMPP is the logical first option. Backup your htdocs folder then re-install. Don't know if you'll need the backup or not (I suspect not)
I agree with David.
It is highly unlikely you can use the remote database at fdb3.runhosting.com using PHP scripts on your local computer. XAMPP includes a MySQL database server and had you not deleted phpMyAdmin you would be able to use that to browse the databases on it.
Develop the website on your local XAMPP install and local XAMPP database, then export the database to the remote host and copy the files across when you are ready to view it online.
It's also worth keeping the XAMPP install folder and others because it contains information on XAMP and I believe allows you to check whether the version you're running is the latest one.
Need some guidance figuring out what went wrong. I've been using mysql, phpmyadmin for just under a year on my home computer while I develop a webapp. 3 days ago I updated my windows vista with all the "wonderful" microsoft updates, security patches, etc...and now it's broke. I tried uninstalling all the upgrades, but there are 4 of them I can't unistall because microsoft says their "operating system" updates and can't be unistalled.
My system is: windows vista, php 5+, mysql 5.1, Apache 2+.
I can run my web app and it queries the database without any problems. However, when I run phpmyadmin to get into the database I get an error: "mysqld.exe has stopped working" and phpmyadmin crashes. I tried going to the command line for mysql to do a mysqldump to backup my database and it gives me an error "2013, could not connect to the server". If I restart the computer the webapp will work again. Basically, php can query the database, but if I try to get at the database through phpmyadmin, or the command prompt the mysqld.exe error occurs and blows mysql out.
Any ideas what's going on here? Any ideas how to get around this to backup the db, so I can reinstall mysql?. I'm really lost where to start. I don't really know if the updates caused the problem, or if the 4 updates that can't be unistalled are really the problem.
Any tips will be appreciated. thanks.
You could try using XAMPP. It has PHP, MySQL, Apache, and other stuff all in one easy to use package.
After a software/ hardware drivers update, it may happened that the service mysqld.exe crashes at each launch (usually with message: mysqld.exe encountered an error and needs to close)
Check the solution described here (it worked for me) if you wish to avoid mysql reinstall.