Hi all, Trying to import a WordPress installation into webfaction servers and I get an "Error establishing a database connection". Anyone can help? Configuration: php-5.4 as static app MysQL private instance. On the mysql private instance, created the user and db for mysql. db_host configured as localhost:prot_given_private_mysql_instance As it didn't work I also include in .htaccess:
from this post: http://community.webfaction.com/questions/8063/php-54-and-wordpress-error-establishing-a-database-connection. Any help will be appreciated. Xavi asked 27 Aug '13, 04:40 xtarafa |
Hello, If you are using a private MySQL instance then you need to specify the protocol name and port to which to connect: mysql -P APP_PORT -u root -p --protocol=tcp -D DBNAME < YOURSQL.sql Please replace APP_PORT with the port on which MySQL is listening, it is available next to the name of the application in your Control Panel, the Domains/websites -> Applications page. Remember to replace DBNAME with the name of the actual database, and YOURSQL.sql with the name of the file to be imported. If you still experience errors then either provide the exact steps you take, or, better yet, open a ticket to us to avoid any sensitive information being displayed out in the open. Sincerely, Valentin I.
WebFaction Support answered 27 Aug '13, 10:06 valentini Hi Valentin, Thanks for the answer but I guess didn't explain myself. What I mean it is how to access from a PHP. As I said this is an wordpress installation, so I've my wp_config.php configured to access it. From console or phpMyAdmin I have no problem accessing to the database. Sincerely, Xavi
(27 Aug '13, 10:10)
xtarafa
|
My mistake. 1) I had confused between private instance and normal BBDD 2) I had a type mismatch on the db name. answered 27 Aug '13, 15:50 xtarafa |
In php.ini you need to declare: Then just use answered 27 Aug '13, 16:29 HittingSmoke |