Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Don't EVER use root in ANY website config.php file to connect, except on localhost. It's a security risk, except on localhost.
and even that may have issues. (depends if you're behind a router, or firewall) and even then it's a BAD HABIT.
What "grant all" statement did you use earlier on piano2?
Code:
grep "grant all" /root/.mysql_history
and if you use mysql -uroot but as yourself, then
Code:
grep "grant all" ~/.mysql_history
One of those has the grant statement.
If it's still not evident, then
Code:
mysql -uroot -p -e "use mysql; select User,Host from user;"
Find the user and use that in your multiple wp-config.php files to connect to each database.
Don't EVER use root in ANY website config.php file to connect, except on localhost. It's a security risk, except on localhost.
and even that may have issues. (depends if you're behind a router, or firewall) and even then it's a BAD HABIT.
Noted and thanks.
Quote:
What "grant all" statement did you use earlier on piano2?
Code:
mysql> grant all on piano2.* to 'wordpress'@'localhost' identified by 'piano0114';
same password for both sites
Quote:
Code:
grep "grant all" /root/.mysql_history
and if you use mysql -uroot but as yourself, then
Code:
grep "grant all" ~/.mysql_history
One of those has the grant statement.
If it's still not evident, then
Code:
mysql -uroot -p -e "use mysql; select User,Host from user;"
Find the user and use that in your multiple wp-config.php files to connect to each database.
# grep "grant all" /root/.mysql_history
Code:
grant all on piano1.* to 'wordpress'@'localhost' identified by 'piano0114';
grant all on piano2.* to 'wordpress'@'localhost' identified by 'piano0114';
grant all on piano1.* to 'wordpress'@'localhost' identified by 'piano0114';
# mysql -uroot -p -e "use mysql; select User,Host from user;"
Enter password:
CREATE DATABASE `sat1317312174333` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
...
CREATE DATABASE `sat1318208313544` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Remove those lines and the "use db;" lines which should be the one below them before you re-import them.
$ gedit Downloads/piano1.sql
deleted following lines
Code:
CREATE DATABASE `sat1317312174333` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `sat1317312174333`;
$ gedit Downloads/piano2.sql
deleted following lines
Code:
CREATE DATABASE `sat1318208313544` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `sat1318208313544`;
# mysql -uroot -p piano1 < Downloads/piano1.sql
Enter password:
# mysql -uroot -p piano2 < Downloads/piano2.sql
Enter password:
(No complaint)
# gedit /var/www/piano1/wp-config.php
Warning on terminal
Code:
....
(gedit:2729): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.24ZH9W': No such file or directory
(gedit:2729): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
(gedit:2729): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
GConf Error: No D-BUS daemon running
Can't proceed to edit
Code:
define('DB_NAME', 'piano1');
/** MySQL database username */
define('DB_USER', 'piano1');
/** MySQL database password */
define('DB_PASSWORD', 'passwd_to_login_database');
define('WP_HOME','http://localhost/piano1');
define('WP_SITEURL','http://localhost/piano1');
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.