New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

wordpress install problem

Got problems with your B2 or B3? Share and get helped!
Post Reply
rewien
Posts: 127
Joined: 27 Sep 2008, 18:10

wordpress install problem

Post by rewien »

Hello all,

I tried installing wordpress with this how to:
How to Install WordPress On Debian Etch
Complete the following the steps:

1. # apt-get install wordpress
2. # mysql -u root
3. mysql> CREATE DATABASE wordpress
4. mysql> GRANT ALL PRIVILEGES ON *.* TO wordpress@localhost
IDENTIFIED BY ‘wordpresspassword’ WITH GRANT OPTION;
5. mysql> FLUSH PRIVILEGES;
6. #mv wp-config-sample.php wp-config.php
7. Edit wp-config.php to enter the correct setting:

// ** MySQL settings ** //
define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', 'wordpresspassword');
define('DB_HOST', 'localhost');

8. Add to /etc/apache2/sites-available/default:

Alias /blog "/usr/share/wordpress/"
<Directory "/usr/share/wordpress/">
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
</Directory>

9. #/etc/init.d/apache2 restart
10. Goto: http://localhost/blog/wp-admin/install.php
11. Follow the instruction to create a login
12. Use generated login to log in and start blogging.
But when i go to:http://bubba/wordpress/wp-admin/install.php

I get the error:

Can’t select database
We were able to connect to the database server (which means your username and password is okay) but not able to select the wordpress database.

Are you sure it exists?
On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. Could that be the problem?
If you don't know how to setup a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.
any idea how to fix this?

i already tried to check the database in mysql and i get:
mysql> CREATE DATABASE wordpress ;
ERROR 1007 (HY000): Can't create database 'wordpress'; database exists
mysql> \q
thanks,
Rewien
Last edited by rewien on 08 Feb 2009, 13:31, edited 1 time in total.
Eek
Posts: 372
Joined: 23 Dec 2007, 03:03
Location: the Netherlands

Post by Eek »

did you install wordpress before?

because the database says there is already a wordpress database.
if you don't know,
just delete the database
drop database wordpress;
rewien
Posts: 127
Joined: 27 Sep 2008, 18:10

Post by rewien »

Eek wrote:did you install wordpress before?

because the database says there is already a wordpress database.
if you don't know,
just delete the database
drop database wordpress;

Hello Eek,

No this is my first time and I created the data base voor wordpress as it saids in the how to.

so there is a data base that's why I don't understand the error.

Thanks,
Rewien
gb119
Posts: 18
Joined: 30 Sep 2008, 16:45

Re: wordpress install problem

Post by gb119 »

rewien wrote: 4. mysql> GRANT ALL PRIVILEGES ON *.* TO wordpress@localhost
IDENTIFIED BY ‘wordpresspassword’ WITH GRANT OPTION;
I suspect that this might be your problem. It looks like the db exists but the php process running as an Apache module can't see it.

As you've configured things, the database will only accept the connection if it comes from the localhost interface of your bubba. This seems sensible for a process to talk to another process on the same machine, but it may be that the php module is in fact binding to one of the thernet interfaces when it opens the connection to the database server - thus the database thinks that is being connected to by wordpress@<bubba-ehternet-ip>.

Try giving all privileges to wordpress@IP address for eth0/1. Don't be tempted to do wordpress@'%' unless you are sure that the database server is properly firewalled (!).
rewien
Posts: 127
Joined: 27 Sep 2008, 18:10

Re: wordpress install problem

Post by rewien »

gb119 wrote:
rewien wrote: 4. mysql> GRANT ALL PRIVILEGES ON *.* TO wordpress@localhost
IDENTIFIED BY ‘wordpresspassword’ WITH GRANT OPTION;
I suspect that this might be your problem. It looks like the db exists but the php process running as an Apache module can't see it.

As you've configured things, the database will only accept the connection if it comes from the localhost interface of your bubba. This seems sensible for a process to talk to another process on the same machine, but it may be that the php module is in fact binding to one of the thernet interfaces when it opens the connection to the database server - thus the database thinks that is being connected to by wordpress@<bubba-ehternet-ip>.

Try giving all privileges to wordpress@IP address for eth0/1. Don't be tempted to do wordpress@'%' unless you are sure that the database server is properly firewalled (!).
Thank you gb119,

stupid me i miss speld wordpress@localhost :oops:

phew the easy things can be hard sometimes ;)
thanks alot,
Rewin
rewien
Posts: 127
Joined: 27 Sep 2008, 18:10

Post by rewien »

Hello all,

I got wordpress working on my bubbatwo, but when i try to connect to it from the outside.
only the firstpage works all the other subpages are trying to go
to : http://bubba/wordpress instead to: http://myip/wordpress

Any idea how to fix this?

thanks,
Rewien
rewien
Posts: 127
Joined: 27 Sep 2008, 18:10

Post by rewien »

any one any idea where Ican configurate this? so that i'm able to view the sub pages from the outside as wel.

at the moment wordpress is working as it schould be at: http://bubba/worpress , but from the outside: http://myip/wordpress only the main page opens, alle the subpages are going to : http://bubba/wordpress instead of : http://myip/wordpress.


Thanks,
Rewien
gb119
Posts: 18
Joined: 30 Sep 2008, 16:45

Post by gb119 »

rewien wrote:any one any idea where Ican configurate this? so that i'm able to view the sub pages from the outside as wel.

at the moment wordpress is working as it schould be at: http://bubba/worpress , but from the outside: http://myip/wordpress only the main page opens, alle the subpages are going to : http://bubba/wordpress instead of : http://myip/wordpress.


Thanks,
Rewien
Ok, the basic problem is that wordpress running on your bubba doesn't know about "the outside". As far as it is concerned, it's running on a webserver with a kosher dns entry that provides a cannonical name 'bubba' - so all URL's that wordpress generates are http://bubba/wordpress...

I don't think it's easy to persuade wordpress to use relative URLs, so you have to instead configure the webserver to host pages on an address that is consistent both internally and externally. If the myip address is the IP of WAN for the bubba (i.e. you have no other NAT'ing router between you and the outside world) then it should be possible to set Apache to listen on the WAN ethernet interface and configure a virtual host that handles wordpress on that interface. Then everything should work as you expect. If your MYIP address is in fact belonging to a router that does network address translation then you have to have more of a problem.

I do something like this (although not for wordpress) by having a dynamic dns name for my ADSL router, and then running bind on the bubba as a dns server and configuring bind so that inside my home network, my dynamic dns name resolves to the bubba. Outside, the dynamic dns name resolves to my ADSL router which simply forwards request to the bubba. Either way pointing to my dynamic dns name always gets me to my bubba which can then happily run servers claiming to be hosted on the dynamic dns name.
rewien
Posts: 127
Joined: 27 Sep 2008, 18:10

Post by rewien »

gb119 wrote:
rewien wrote:any one any idea where Ican configurate this? so that i'm able to view the sub pages from the outside as wel.

at the moment wordpress is working as it schould be at: http://bubba/worpress , but from the outside: http://myip/wordpress only the main page opens, alle the subpages are going to : http://bubba/wordpress instead of : http://myip/wordpress.


Thanks,
Rewien
Ok, the basic problem is that wordpress running on your bubba doesn't know about "the outside". As far as it is concerned, it's running on a webserver with a kosher dns entry that provides a cannonical name 'bubba' - so all URL's that wordpress generates are http://bubba/wordpress...

I don't think it's easy to persuade wordpress to use relative URLs, so you have to instead configure the webserver to host pages on an address that is consistent both internally and externally. If the myip address is the IP of WAN for the bubba (i.e. you have no other NAT'ing router between you and the outside world) then it should be possible to set Apache to listen on the WAN ethernet interface and configure a virtual host that handles wordpress on that interface. Then everything should work as you expect. If your MYIP address is in fact belonging to a router that does network address translation then you have to have more of a problem.

I do something like this (although not for wordpress) by having a dynamic dns name for my ADSL router, and then running bind on the bubba as a dns server and configuring bind so that inside my home network, my dynamic dns name resolves to the bubba. Outside, the dynamic dns name resolves to my ADSL router which simply forwards request to the bubba. Either way pointing to my dynamic dns name always gets me to my bubba which can then happily run servers claiming to be hosted on the dynamic dns name.

Thank you gb119,

I fixed it. the problem was that i ran the setup file: "10. Goto: http://localhost/blog/wp-admin/install.php" on my http://bubba/wordpress instead of http://myip/wordpress

that did the trick!

many thanks,
Rewien
winzhangout
Posts: 58
Joined: 29 Mar 2009, 17:12

Post by winzhangout »

when writing this GRANT ALL PRIVILEGES ON *.* TO wordpress@localhost
IDENTIFIED BY 'wordpresspassword' WITH GRANT OPTION;



i get this error
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to yoyr MYSQL server version for the right syntax to use near 'GRANT LL PRIVILEGES ON *.* TO wordpress@localhost IDENTIFIED BY 'wordpresspassw' at line 2and that means?
Post Reply