赞
踩
一、安装mysql
在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,执行下面语句查看字符编码
sudo /etc/init.d/mysql restart
mysql -uroot -p
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)
结果显示已经正确设置为UTF8字符编码了。
三、创建用户、权限
create user ejbca IDENTIFIED BY 'ejbca';
GRANT ALL PRIVILEGES ON *.* TO ejbca@localhost;
上面语句会创建用户:ejbca,并设置密码为ejbca,设置本机访问的权限
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。