Fork me on GitHub

【06-18】CentOS使用笔记


使用中文输入法


  1. 搜狗输入法只支持Ubuntu
  2. sudo yum install "@Chinese Support"
  3. 【系统】--->【首选项】--->【输入法】-->【启动输入法特性】-->【首先输入法】-->【输入法】-->添加【汉语-Pinyin】
  4. Ctrl+Space切换输入法

mysql安装


yum安装

参考 http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html

启动mysqld服务:sudo service mysqld start

检查服务状态:sudo service mysqld status

连接服务器:mysql -uroot -p

 

启动服务:service mysql start | | restart

 检查配置:chkconfig --list | grep mysqld

设置开机自动启动:chkconfig mysqld on

设置root用户密码:mysqladmin -u root password 'root'

    ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';

 

安全模式下重置密码:copy自 http://www.linuxidc.com/Linux/2014-03/98718.htm

启动mysql:
#/etc/init.d/mysql start

启动成功后查看mysql进程信息,获取mysqld_safe的安装目录:
#ps -ef | grep -i mysql
root 3466 1 0 01:45 pts/1 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/BSC.TEST.pid
mysql 3569 3466 16 01:45 pts/1 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/BSC.TEST.err --pid-file=/var/lib/mysql/BSC.TEST.pid
root 3597 3105 0 01:45 pts/1 00:00:00 grep -i mysql

以安全方式启动mysql:
#/usr/bin/mysqld_safe --skip-grant-tables >/dev/null 2>&1 &

启动mysql:
#/usr/bin/mysql -u root mysql

更新密码:
update mysql.user set authentication_string=password('root') where user='root' and Host ='localhost';

 

登录:mysql -u root -p

mysql配置文件路经:/ect/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

 


安装mysql workbench


yum --disablerepo=\* --enablerepo='mysql*-community*' list available
sudo dnf install mysql-workbench-community
sudo yum install mysql-community-libs

 

posted @ 2016-06-18 11:35  aloha_world  阅读(154)  评论(0编辑  收藏  举报