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";

Did you find this article helpful?
BigRyan 2012-09-18 3:47 pm
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!
BigRyan 2012-09-18 3:47 pm
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!
BigRyan 2012-09-18 3:47 pm
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!

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

The Community Support team wrote the article you're looking at now. We like to think it's perfect, but we're sure you have some suggestions. Please, let us know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.