Installing MySQL server in Ubuntu is simpler, and a single command can be done as follows:
sudo apt-get install Mysql-server
However, installing MySQL with Apt-get can not set the default character set, may be I do not understand how to do, install the default character set is Latin1, you can log on to MySQL after the status command to view, the display reads as follows:
root@ubuntu-vm:/home/kuuyee# Mysql-u Root-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 4
Server version:5.0.51a-3ubuntu5.4 (Ubuntu)
Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the buffer.
mysql> status
--------------
MySQL Ver 14.12 distrib 5.0.51a, for Debian-linux-gnu (i486) using ReadLine 5.2
Connection Id:4
Current database:
Current User:root@localhost
Ssl:not in use
Current Pager:stdout
Using outfile: '
Using delimiter:;
Server version:5.0.51a-3ubuntu5.4 (Ubuntu)
Protocol version:10
Connection:localhost via UNIX socket
Server characterset:latin1
Db characterset:latin1
Client characterset:latin1
Conn. Characterset:latin1
UNIX Socket:/var/run/mysqld/mysqld.sock
Uptime:16 hours sec
Threads:1 questions:10 Slow queries:0 opens:12 Flush tables:1 Open tables:6 queries per second avg:0.000
--------------
The workaround is to change the/etc/mysql/my.cnf file and add the following under [Mysqld] and [MySQL]:
[mysqld]
default-character-set=utf8
default-storage-engine=INNODB
[mysql]
default-character-set=utf8
Then restart the MySQL server, commands are as follows:
Sudo/etc/init.d/mysql restart
Then check the status, hehe! The character set becomes Utf-8!