首页 >数据库 >mysql教程 >ubuntu12.04 安装mysql_MySQL

ubuntu12.04 安装mysql_MySQL

WBOY
WBOY原创
2016-06-01 13:11:391025浏览

Ubuntu

在Ubuntu12.04 之前的版本中配置MySQL数据库非常方便,只需要运行3条命令即可:

       sudo apt-get install mysql-server

       sudo apt-get install mysql-admin

       sudo apt-get install mysql-query-browser

现在ubuntu12.04 只要执行两条命令即可:

      sudo apt-get install mysql-server

      sudo apt-get install mysql-workbench


设置UFT8

sudo gedit /etc/mysql/my.cnf

在[mysqd]下面加入

character-set-server=utf8

保存,重启mysql

show variables like 'character%';

+--------------------------+----------------------------+

| Variable_name            | Value                      |

+--------------------------+----------------------------+

| character_set_client     | utf8                       |

| character_set_connection | utf8                       |

| character_set_database   | utf8                       |

| character_set_filesystem | binary                     |

| character_set_results    | utf8                       |

| character_set_server     | utf8                       |

| character_set_system     | utf8                       |

| character_sets_dir       | /usr/share/mysql/charsets/ |

+--------------------------+----------------------------+

8 rows in set (0.00 sec)


创建用户、权限:

create user ejbca IDENTIFIED BY 'ejbca';

GRANT ALL PRIVILEGES ON *.* TO ejbca@localhost;



声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn