Installing Wordpress: Having Problems With The Install Script


Recommended Posts

Hello Everyone:

Well, I have my server active, and I have solved one problem that is bothering me. Now, I want to install Wordpress 2.7. I have access to webmin to access the servers config, and I have added a database for the Wordpress blog, but when I set the mysql username and password to what it shows in the control panel, and add the info in the script, and try to install, it says:

Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at 192.168.1.60. This could mean your host's database server is down.

Are you sure you have the correct username and password?

Are you sure that you have typed the correct hostname?

Are you sure that the database server is running?

If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums

I'm not sure if the username has to be the same one that is for user 'mysql' in the password file, but I did make a user "brian" and a password for that user and gave that user all rights. If necessary I will post the wp-config.php file, but I know that I have installed PhpMyadmin and webmin, so I know that mysql is running, I just cant get it connect to the database.

any ideas??

Brian

Link to post
Share on other sites

I do not have experience running WordPress on a local server, but I do have it installed on a web host.

In the shared web hosting environment our database names usually look like this: account_database

And the database user usually looks like this: account_user

Where "account" is the name of the shared hosting space and "account_user" has permissions to access "account_database".

As a result, when it is time to specify the database and user in wp-config.php, here is what we must enter:

define('DB_NAME', 'account_database');
define('DB_USER', 'account_user');

Also note that you must also enter the password that gives "account_user" the permission to access "account_database". 'DB_HOST' is usually just 'localhost':

define('DB_PASSWORD', 'yourpasswordhere');
define('DB_HOST', 'localhost');

Edited by Falcon1986
Link to post
Share on other sites

from the command line make a mysql connection with that username and password, if you have webmin you most likely have ssh access.

Link to post
Share on other sites

I cannot seem to make a connection to the mysql server with any results: I get:

root@Eliveserver[/var/www/brian/wordpress]# mysql -u brian

ERROR 1045 (28000): Access denied for user 'brian'@'localhost' (using password: NO)

root@Eliveserver[/var/www/brian/wordpress]# mysql -u brian -p

Enter password:

ERROR 1045 (28000): Access denied for user 'brian'@'localhost' (using password: YES)

root@Eliveserver[/var/www/brian/wordpress]# mysql -h 192.168.1.60 -u brian -p

Enter password:

ERROR 1045 (28000): Access denied for user 'brian'@'buddy-baker.us' (using password: YES)

What am I doing wrong?? should I just post my wp-config.php file for someone to look at??

Brian

Link to post
Share on other sites

try root.

your webmin probably did not create the user correctly

http://dev.mysql.com/doc/refman/5.1/en/adding-users.html

Link to post
Share on other sites
try root.

your webmin probably did not create the user correctly

http://dev.mysql.com/doc/refman/5.1/en/adding-users.html

OK: will DELETE the 'brian' user and try again using these instructions, and will keep you posted as to the results ;)

Thanks for the help Iccaros ;)

Brian

Link to post
Share on other sites

Iccaros:

I created the user, and am STILL having problems with the setup: I connect from my machine to 192.168.1.60, which is the IP address of the elive server, which is also known as Eliveserver.buddy-baker.us. I placed the server's wp=config.php here for you to see. The passwords work, permissions seem OK, but the script cannot connect to the server:

<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information by
* visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don't have to use the web site, you can just copy this file
* to "wp-config.php" and fill in the values.
*
* @package WordPress
*/

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'brian');

/** MySQL database password */
define('DB_PASSWORD', 'password_removed_for_security');

/** MySQL hostname */
define('DB_HOST', '192.168.1.60');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

/**#@+
* Authentication Unique Keys.
*
* Change these to different unique phrases!
* You can generate these using the {@link http://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
*
* @since 2.6.0
*/
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
/**#@-*/

/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';

/**
* WordPress Localized Language, defaults to English.
*
* Change this to localize WordPress. A corresponding MO file for the chosen
* language must be installed to wp-content/languages. For example, install
* de.mo to wp-content/languages and set WPLANG to 'de' to enable German
* language support.
*/
define ('WPLANG', '');

/* That's all, stop editing! Happy blogging. */

/** WordPress absolute path to the Wordpress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
?>

I am not sure what the problem is, but I cannot get wordpress to connect to the database at 192.168.1.60 if I do it from a web browser. any suggestions??

Thanks,

Brian

Link to post
Share on other sites

the server that has mysql is different from the one with wordpress (yes?)

if so it could be several issues

is iptables blocking the ports (try /etc/init.d/iptables stop ) on both boxes for testing..

see http://www.cyberciti.biz/tips/how-do-i-ena...ase-server.html

for more on that

sorry it took a while.. I have been out of town.

Link to post
Share on other sites
the server that has mysql is different from the one with wordpress (yes?)

if so it could be several issues

is iptables blocking the ports (try /etc/init.d/iptables stop ) on both boxes for testing..

see http://www.cyberciti.biz/tips/how-do-i-ena...ase-server.html

for more on that

sorry it took a while.. I have been out of town.

Iccaros:

No Problem!! :)

The server that has MYSQL is the same as the onwe that has wordpress. Wordprerss is in my /var/www/brian directory. however, i did set up a virtual directory - not sure if that has anything to do with it, but I can connect to it from my computers - I just cant install wordpress.

Will look at this info and see what the deal is, but wordpress support for this issue sucks :(

Thanks,

Brian

Link to post
Share on other sites

then you need to remove the address and use localhost

but get back to mysql

from a root command line if you type mysql and nothing else does it let you in?

if so change your username to root and remove all between the "" for the password

by default mysql does not allow network access so root with no password is ok (as long as you locked down file level access in apache, and turned off other communications and moved ssh to another port )

:)

Sorry if we are repeating, but I need to startover to make sure I did not skip anything.

also I would give your wordpress DB name a unique name. like mysite. they suggest WP_ and a name, This way if you end up hosting more than one site (using Vhost) you do not have to reconfigure, plus if someone gets into Mysql they have to guess the correct DB.

well work on a different user after

Link to post
Share on other sites

Iccaros:

I actually got Wordpress Installed, but had to access PHPMyadmin, which was hard as hell, because I figured I would NOT be able to access it. I edited the file in in /etc/phpmyadmin (the config.inc.php) file to set the database to localhost and I also went into the PhpMyadmin to make a user called 'user' with ONLY access permissions to my database, called wordpress.

After I did that, I made sure that I had permissions for 'localhost' on all db's associated with wordpress, entered 'user' as the database user, and left the password blank. I went to the server and did a

(http://localhost/wordpress/wp-admin/install.php) and she Installed.

Now, I want to make it so that I have my host pointed at 192.168.1.60 and when I do this, I want to be able to login as admin, and config the setup so I can blog, but with everything 'localhost' ot is hard to do.

Can you help me fix this??

Brian

Link to post
Share on other sites
Iccaros:

I actually got Wordpress Installed, but had to access PHPMyadmin, which was hard as hell, because I figured I would NOT be able to access it. I edited the file in in /etc/phpmyadmin (the config.inc.php) file to set the database to localhost and I also went into the PhpMyadmin to make a user called 'user' with ONLY access permissions to my database, called wordpress.

After I did that, I made sure that I had permissions for 'localhost' on all db's associated with wordpress, entered 'user' as the database user, and left the password blank. I went to the server and did a

(http://localhost/wordpress/wp-admin/install.php) and she Installed.

Now, I want to make it so that I have my host pointed at 192.168.1.60 and when I do this, I want to be able to login as admin, and config the setup so I can blog, but with everything 'localhost' ot is hard to do.

Can you help me fix this??

Brian

OK: Fixed the problem: this is how I did it.

1. I changed all necessary setups to 'localhost' in all files necessary to make the install work properly.

2. I logged in as root for access to PhpMyAdmin - Then created a dummy user called 'user' (Host is localhost) with no password and NO permissions on the database 'wordpress' other then 'usage', which apparently is what you get when you make a user with PhpMyadmin with No permissions given

3. I logged in as admin, with the supplied password

4. From there, went to general settings, and found the 'wordpress address field', which has "http://localhost/wordpress/" - changed this to 192.168.1.60, which is the address of my server for now. Also changed the Blog Address to this and Saved the info. Then I went to oddessy, and tried to login directly, and I was granted access based on the IP of the server. I tested it from my Vista Laptop and it works well.

Thanks for the help. Is there any permission changes I should make to the files in /var/www/brian/wordpress to secure them, or is root root OK??

Brian

Link to post
Share on other sites

normally it should be apache apache

if you are blogging you need to control comments. So for each page you make, ensure you set permissions for comments (you go to the bottom and there is a + next to it to expand.. )

Link to post
Share on other sites
normally it should be apache apache

if you are blogging you need to control comments. So for each page you make, ensure you set permissions for comments (you go to the bottom and there is a + next to it to expand.. )

Thanks, will check that out :)

Brian

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...