The following script is used to assist you in changing your database tables to UTF-8. To use this script, create a a php file in your account and call if from a browser. Be sure to make the required edits to this script to use your database credentials.
Please note, if you would like to convert database to a different character set and collation, you can edit the following two lines with your preferred character set and collation:
$sql = "ALTER TABLE $table DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
print "$table changed to UTF-8 successfully.\n";
I'm new to this whole system so I'm not sure how to apply the script. I tried to create a php file using the script and upload it to my ftp site, and run the php file through the web browser. But I got the following message:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ryanwa5_wrdp2'@'localhost' (using password: YES) in /home/ryanwa5/public_html/sample/utf.php on line 12
Access denied for user 'ryanwa5_wrdp2'@'localhost' (using password: YES)
I guess I need to specify the server name instead of localhost alias? How can I find out my localhost?
An additional question, I simply installed wordpress but not created any mysql database. Was the databases created automatically when I'm installing wordpress on my site? Thanks!
I'm new to this whole system so I'm not sure how to apply the script. I tried to create a php file using the script and upload it to my ftp site, and run the php file through the web browser. But I got the following message:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ryanwa5_wrdp2'@'localhost' (using password: YES) in /home/ryanwa5/public_html/sample/utf.php on line 12
Access denied for user 'ryanwa5_wrdp2'@'localhost' (using password: YES)
I guess I need to specify the server name instead of localhost alias? How can I find out my localhost?
An additional question, I simply installed wordpress but not created any mysql database. Was the databases created automatically when I'm installing wordpress on my site? Thanks!
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ryanwa5_wrdp2'@'localhost' (using password: YES) in /home/ryanwa5/public_html/sample/utf.php on line 12
Access denied for user 'ryanwa5_wrdp2'@'localhost' (using password: YES)
I guess I need to specify the server name instead of localhost alias? How can I find out my localhost?
An additional question, I simply installed wordpress but not created any mysql database. Was the databases created automatically when I'm installing wordpress on my site? Thanks!