Cesare Rossi
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Error connecting remote DBSteve,
don’t worry about the password in clear, it is the standard password we use in public Hand-On-Labs in VMworld, so about 30,000 people every year knows that password ??
I’ve change that password with “password” but nothing changed.
The wp-mysql-test.php You mention says:
[root@centos6 html]# php /var/www/html/wp-mysql-test.php
Connected successfully to the MySQL server
Database selected successfullyChecking tables for errors:
The table wordpress.wp_commentmeta is OK
The table wordpress.wp_comments is OK
The table wordpress.wp_links is OK
The table wordpress.wp_options is OK
The table wordpress.wp_postmeta is OK
The table wordpress.wp_posts is OK
The table wordpress.wp_term_relationships is OK
The table wordpress.wp_term_taxonomy is OK
The table wordpress.wp_termmeta is OK
The table wordpress.wp_terms is OK
The table wordpress.wp_usermeta is OK
The table wordpress.wp_users is OKThank You for Your cooperation.
- This reply was modified 7 years, 3 months ago by Cesare Rossi.
- This reply was modified 7 years, 3 months ago by Cesare Rossi.
- This reply was modified 7 years, 3 months ago by Cesare Rossi.
Forum: Fixing WordPress
In reply to: Error connecting remote DBI activated debug options on wp-config.php and the error showed is:
Warning: mysql_connect(): Can’t connect to MySQL server on ‘centosdb.ross.lan’ (13) in /var/www/html/wp-includes/wp-db.php on line 1569
The line in wp-includes is:
$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
Forum: Fixing WordPress
In reply to: Error connecting remote DBThis is the wp.sh install script (CentOS 6):
#!/bin/bash
WP_DB_NAME=wordpress
WP_DB_USER=wordpressuser
WP_DB_PASSWORD=VMware1!
WP_DB_HOST=centosdb.ross.lan
site_ip=centos6.ross.lan
wordpress_site_files=/var/www/html/
site_title=Wordpress01
admin_user=admin
admin_password=VMware1!
[email protected]/sbin/chkconfig iptables off
/sbin/chkconfig ip6tables off
/sbin/service iptables stop
/sbin/service ip6tables stopyum install -y wget
yum install -y mysql/usr/bin/yum install httpd -y
/sbin/chkconfig httpd on
/sbin/service httpd start/usr/bin/yum install php php-mysql mysql-client -y
/usr/bin/yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel/sbin/service httpd restart
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
mv wp-cli.phar /usr/local/bin/wptouch /var/www/html/index.php
echo “<html><body><h1>Welcome to VMware Apache Server! My IP Address is: <?php echo \$_SERVER[‘SERVER_ADDR’]; ?></h1></body></html>” > /var/www/html/index.phpcd /tmp
/usr/bin/wget https://www.ads-software.com/latest.tar.gz –output-document=/tmp/latest.tar.gz
/bin/tar -xzvf /tmp/latest.tar.gz
yes | cp -rf /tmp/wordpress/* /var/www/html/cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
/bin/sed -i “s/database_name_here/$WP_DB_NAME/g” /var/www/html/wp-config.php
/bin/sed -i “s/username_here/$WP_DB_USER/g” /var/www/html/wp-config.php
/bin/sed -i “s/password_here/$WP_DB_PASSWORD/g” /var/www/html/wp-config.php
/bin/sed -i “s/localhost/$WP_DB_HOST/g” /var/www/html/wp-config.phpwp core install –url=https://$site_ip –path=$wordpress_site_files –title=”Welcome to the home of the $site_title” –admin_user=$admin_user –admin_password=$admin_password –admin_email=$admin_email
/sbin/service httpd restart
Forum: Fixing WordPress
In reply to: Error connecting remote DBSteve,
thank You for your answer.
In both the servers the hosts file contains the definition for both server names:
10.15.63.82 centos6 centos6.ross.lan
10.15.63.83 centosdb centosdb.ross.lanI’ve tried to assign permissions to the DB on: hostname (short), hostname (FQDN), IP address for root & wordpressuser
____________________________________________________
#!/bin/bash
dbadmin=root
dbadminpassword=VMware1!
dbaddress=centosdb.ross.lan
wpdbname=wordpress
wpuser=wordpressuser
wppassword=VMware1!
wpaddress=centos6.ross.lan
wpaddressshort=centos6
wpaddressip=10.15.63.82/sbin/chkconfig iptables off
/sbin/chkconfig ip6tables off
/sbin/service iptables stop
/sbin/service ip6tables stop/usr/bin/yum install mysql mysql-server -y
/sbin/chkconfig mysqld on
/sbin/service mysqld start/usr/bin/mysql -e “UPDATE mysql.user SET Password=PASSWORD(‘$dbadminpassword’) WHERE User=’$dbadmin’;”
/usr/bin/mysql -e “DELETE FROM mysql.user WHERE User=”;”
/usr/bin/mysql -e “DROP DATABASE test;”
/usr/bin/mysql -e “FLUSH PRIVILEGES;”/usr/bin/mysql -e “CREATE DATABASE $wpdbname;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “CREATE USER ‘$dbadmin’@’$wpaddress’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “SET PASSWORD FOR ‘$dbadmin’@’$wpaddress’=PASSWORD(‘$dbadminpassword’);” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL PRIVILEGES ON *.* TO ‘$dbadmin’@’$wpaddress’ IDENTIFIED BY ‘$dbadminpassword’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL ON *.* TO ‘$dbadmin’@’$wpaddress’ IDENTIFIED BY ‘$dbadminpassword’;” –user=$dbadmin –password=$dbadminpassword/usr/bin/mysql -e “CREATE USER ‘$dbadmin’@’$wpaddressshort’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “SET PASSWORD FOR ‘$dbadmin’@’$wpaddressshort’=PASSWORD(‘$dbadminpassword’);” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL PRIVILEGES ON *.* TO ‘$dbadmin’@’$wpaddressshort’ IDENTIFIED BY ‘$dbadminpassword’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL ON *.* TO ‘$dbadmin’@’$wpaddressshort’ IDENTIFIED BY ‘$dbadminpassword’;” –user=$dbadmin –password=$dbadminpassword/usr/bin/mysql -e “CREATE USER ‘$dbadmin’@’$wpaddressip’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “SET PASSWORD FOR ‘$dbadmin’@’$wpaddressip’=PASSWORD(‘$dbadminpassword’);” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL PRIVILEGES ON *.* TO ‘$dbadmin’@’$wpaddressip’ IDENTIFIED BY ‘$dbadminpassword’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL ON *.* TO ‘$dbadmin’@’$wpaddressip’ IDENTIFIED BY ‘$dbadminpassword’;” –user=$dbadmin –password=$dbadminpassword/usr/bin/mysql -e “CREATE USER ‘$wpuser’@’$wpaddress’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “SET PASSWORD FOR ‘$wpuser’@’$wpaddress’=PASSWORD(‘$wppassword’);” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL PRIVILEGES ON $wpdbname.* TO ‘$wpuser’@’$wpaddress’ IDENTIFIED BY ‘$wppassword’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL ON $wpdbname.* TO ‘$wpuser’@’$wpaddress’ IDENTIFIED BY ‘$wppassword’;” –user=$dbadmin –password=$dbadminpassword/usr/bin/mysql -e “CREATE USER ‘$wpuser’@’$wpaddressshort’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “SET PASSWORD FOR ‘$wpuser’@’$wpaddressshort’=PASSWORD(‘$wppassword’);” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL PRIVILEGES ON $wpdbname.* TO ‘$wpuser’@’$wpaddressshort’ IDENTIFIED BY ‘$wppassword’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL ON $wpdbname.* TO ‘$wpuser’@’$wpaddressshort’ IDENTIFIED BY ‘$wppassword’;” –user=$dbadmin –password=$dbadminpassword/usr/bin/mysql -e “CREATE USER ‘$wpuser’@’$wpaddresssip’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “SET PASSWORD FOR ‘$wpuser’@’$wpaddresip’=PASSWORD(‘$wppassword’);” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL PRIVILEGES ON $wpdbname.* TO ‘$wpuser’@’$wpaddressip’ IDENTIFIED BY ‘$wppassword’;” –user=$dbadmin –password=$dbadminpassword
/usr/bin/mysql -e “GRANT ALL ON $wpdbname.* TO ‘$wpuser’@’$wpaddressip’ IDENTIFIED BY ‘$wppassword’;” –user=$dbadmin –password=$dbadminpassword/usr/bin/mysql -e “FLUSH PRIVILEGES;” –user=$dbadmin –password=$dbadminpassword
______________________________________________________________________________No way…
Hi,
same problem here. web server on 10.15.63.82, db server on 10.15.6.83.
Permissions for wordpressuser on WordPress db:
+———————————————————————————————————————–+
| Grants for wordpressuser@% |
+———————————————————————————————————————–+
| GRANT ALL PRIVILEGES ON *.* TO ‘wordpressuser’@’%’ IDENTIFIED BY PASSWORD ‘*16907081F70B954E79743DA4F785043069E9D33F’ |
| GRANT ALL PRIVILEGES ONwordpress
.* TO ‘wordpressuser’@’%’ |
+———————————————————————————————————————–+Connecting from web server to db server with mysql works fine:
[root@centos6 ~]# mysql -u wordpressuser -p -h 10.15.63.83
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 5.1.73 Source distributionCopyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> show grants;
+———————————————————————————————————————–+
| Grants for wordpressuser@% |
+———————————————————————————————————————–+
| GRANT ALL PRIVILEGES ON *.* TO ‘wordpressuser’@’%’ IDENTIFIED BY PASSWORD ‘*16907081F70B954E79743DA4F785043069E9D33F’ |
| GRANT ALL PRIVILEGES ONwordpress
.* TO ‘wordpressuser’@’%’ |
+———————————————————————————————————————–+Always receive “Error establishing a database connection”: no way to solve it.
I’ve changed permissions on /var/ to 777 ??
Forum: Plugins
In reply to: [Postie] Postie broken in 3.3 _fill_user() problemThe same here…
Forum: Plugins
In reply to: [WPBook] WPBook: 2.2 image thumbThis is my blog post:
https://blog.americacube.us/2011/04/04/svizzeri/And this is the Facebook “publish as note” post:
https://www.facebook.com/notes/cesare-g-rossi/svizzeri/10150143975257374Before WPBook update all my blog post were published to Facebook with the hyperlink that point to the blog page: now the hyperlink opens the facebook post…
Try this post of my blog:
https://blog.americacube.us/2011/03/20/torta-flor-150/and search for the same post on Facebook on my wall:
https://www.facebook.com/Back2FutureForum: Plugins
In reply to: [WPBook] WPBook: 2.2 image thumbIf you use “post as note” the hyperlink on facebook doesn’t open the blog post anymore..
Forum: Plugins
In reply to: [WPBook] WPBook: 2.2 image thumbThank You, Coach! Setting WPBook to post to my wall as a Note fixed the bug, but now the text of published post from my blog is limited to only one line of text… ??
Forum: Plugins
In reply to: [WPBook] WPBook: 2.2 image thumbTell me more… I’ve the same bug!