Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Cesare Rossi

    (@back2future)

    Steve,

    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 successfully

    Checking 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 OK

    Thank You for Your cooperation.

    • This reply was modified 8 years, 5 months ago by Cesare Rossi.
    • This reply was modified 8 years, 5 months ago by Cesare Rossi.
    • This reply was modified 8 years, 5 months ago by Cesare Rossi.
    Thread Starter Cesare Rossi

    (@back2future)

    I 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 );

    Thread Starter Cesare Rossi

    (@back2future)

    This 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!
    admin_email=administrator@ross.lan

    /sbin/chkconfig iptables off
    /sbin/chkconfig ip6tables off
    /sbin/service iptables stop
    /sbin/service ip6tables stop

    yum 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/wp

    touch /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.php

    cd /tmp
    /usr/bin/wget http://wordpress.org/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.php

    wp core install –url=http://$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

    Thread Starter Cesare Rossi

    (@back2future)

    Steve,

    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.lan

    I’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 ON wordpress.* 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 distribution

    Copyright (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 ON wordpress.* TO ‘wordpressuser’@’%’ |
    +———————————————————————————————————————–+

    Always receive “Error establishing a database connection”: no way to solve it.

    I’ve changed permissions on /var/ to 777 🙁

    The same here…

    This is my blog post:
    http://blog.americacube.us/2011/04/04/svizzeri/

    And this is the Facebook “publish as note” post:
    http://www.facebook.com/notes/cesare-g-rossi/svizzeri/10150143975257374

    Before 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:
    http://blog.americacube.us/2011/03/20/torta-flor-150/

    and search for the same post on Facebook on my wall:
    http://www.facebook.com/Back2Future

    If you use “post as note” the hyperlink on facebook doesn’t open the blog post anymore..

    Thank 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… 🙁

    Tell me more… I’ve the same bug!

Viewing 10 replies - 1 through 10 (of 10 total)