Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I can't log into my instance of phpMyAdmin via cookie authentication using Google Chrome. I keep getting bounced back to the login page with a warning about cookies.

I'm running Ubuntu 10.04.2 LTS server, MySQL server 5.1.41, Apache 2.2.14 and have just downloaded phpMyAdmin 3.4.4. I'm using Chrome stable (13 currently) on Mac OS X 10.6.8 as browser.

I have done the setup using Setup Script provided with phpMyAdmin package, using cookie authentication. However when I navigate to http://localhost/phpmyadmin/index.php to login, after submitting the form it is redirected back to the login form without error message or indication of any kind.

I have tried clear all browsing data from Google Chrome settings and loaded /phpmyadmin/index.php again. There was an message saying "Cookie must be enabled" but this only shows up once, disappeared after refreshing. Login is still a no go.

I've tried Safari 5 as well with the exact same results (including the cookie warning message). Firefox 6.0 login was successful though.

After I have tried a change to "config" authentication (by putting "root" and password in config.ini.php Google Chrome is now able to login, but have no privileges to create databases.

Finally I have to do the database setup with command line.

What could be the problem here?

share|improve this question
add comment

1 Answer

What kind of installer did you use to install MySQL? Did you download a .dmg or did you download the source and compile it yourself? That is important to know because that dictates how MySQL is setup initially.

There are potentially two separate issues here.

  1. The MySQL init script wasn't run after/during the install so there are no defacto databases installed.

To check this:

$ mysql -u root localhost -p
Enter Password: <-Enter the root password for MySQL
$ mysql> show databases; <ENTER>
$ +--------------------+
$ | Database           |
$ +--------------------+
$ | information_schema |
$ | test               |
$ +--------------------+
$ 2 rows in set (0.01 sec)

mysql>

If you run that command and don't get back what I posted above, you are going to have to track down the MySQL init script on your machine. It will most likely be in /usr/local/mysql/scripts. Consequently, your install of MySQL should be in /usr/local/mysql. The script to run would be mysql_install_db from the script directory mentioned above.

  1. It sounds as though your config when running the web based initializer may not be getting written to config.ini.php. You may want to look into that. As I recall, after doing the online setup with phpMyAdmin you have to manually go in and move config.ini.php to the /config directory in the root of phpMyAdmin. The short story, go over your config.ini.php, make sure it is correct, and make sure it is in the correct directory and rw by the user owns the process that Apache runs under (usually apache:apache).

Additional Note: It is possible that the "skip-networking" parameter in my.conf is configured as true. If this is the case, the only way to connect to MySQL is via unix socket which is generally located in /var/run/mysqld/mysqld.sock. Your my.cnf will be somewhere under your install path. Because this can vary pretty drastically, I can't exactly tell you where its at. While you're looking at your my.cnf though, also look at the parameter "bind-address". If this parameter is set to something weird you will run into problems if you need to access the server via the network. Also if it's bound to localhost or 127.0.0.1 you will need to make sure that phpMyAdmin is connecting to the server on one of those two address and the user account you are using to login to MySQL from phpMyAdmin matches host in that parameter. e.g. root@localhost

I hope this helps. We should definitely be able to get this ironed out though. MySQL/phpMyAdmin is highly common and there are some really smart folks on here. Let us know.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.