• After installing WP successfully on a Debian 508 system, I invoked the install.php script as directed, filled out the db creation stuff, and no matter what I do, the system tells me it cannot connect to the SQL server, which I know is started because I can communicate with it via the shell and the command “/etc/init.d/mysql status” says it’s up and running. I’ve tried ‘localhost”, ‘127.0.0.1’, the fully qualified host name, nothing works. What’d I do wrong? It all went so smoothly and looked so easy, I probably have forgotten some silly single step along the way, but I sure can’t think of what it could be.

    Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • If you have already created the mysql user and database specific to WordPress installation, then try to connect to it from the shell using this code…

    mysql -u username -p dbname

    You’ll be prompted to enter the password that should let you into MySQL prompt. Type ‘quit’ inside MySQL console to come back to your default shell.

    If this succeeds, WordPress should have no problem connecting either.

    Thread Starter number6tgv

    (@number6tgv)

    To be honest, I’m not sure I have done that, even. I followed the instruction on the WP page that said to go into MySQL and type “create <db-name>” which I did, but I’m not even sure that worked. I got no confirmation message that looked anything at all like what the docs page showed, and I even tried removing it with “mysql remove <db-name>” and got the same response–about 40 lines of gook, none of which mentioned my database at all.

    If you are new to managing databases from the command line, I’d recommend to install phpmyadmin. You can create a new database and a new user (just for WordPress) right from phpmyadmin.

    Thread Starter number6tgv

    (@number6tgv)

    Well, kit seems as though I have more problems than just creating a WP db. I can’t even connect to my MySQL server. I’ve tried resetting the “root” password via mysql_safe with the –skip-grant-tables and –skip-networking options on the startup command line, the mysql commands were all accepted OK, I flushed the pvileges and everything, but still can’t connect to myself. Until this issue is resolved, I don’t see how anything else will work.

    You may at this point want to contact your hosting provider. They should be able to help you correctly set up a database and attach a user with the correct privileges to it.

    Also, you really should look into installing PHPMyAdmin to manage your databases. It simplifies working with the databases if your not comfortable with the command line.

    Thread Starter number6tgv

    (@number6tgv)

    Turns out, I had a basic misunderstanding of how to set things up. I was under the impression that the MySQL database would be automatically created by the WP install PHP. Since it’s the only thing I’m using SQL for, I realized I could tell the install script to use the standard mysql database for the WP tables. I also had some password issues with MySQL itself, but I got those ironed out. FYI, folks, using mysql_safe swith the ‘update user’ command doesn’t seem to reset the password, even though it tells you it’s been reset. I had to remove mysql-server-5.0 and re-install it. Thankfully this system does not use SQL for anything else, otherwise I’d’ve been in the proverbial stew pot! Thanks for all your collective help. WP is now up and running and in the capable hands of the blog administrator.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘install.php can't connect to SQL db’ is closed to new replies.