时间:2021-07-01 10:21:17 帮助过:2人阅读
yum install -y libaio
rpm -e mysql-libs-5.1.71-1.el6.x86_64 --nodeps
3:添加启动服务 \cp support-files/mysql.server /etc/init.d/mysqld
在cp指令前面加反斜杠可以不弹出是否覆盖的询问而直接覆盖!
4:修改启动脚本文件路径,否则启动失败
/etc/init.d/mysqld start
Starting MySQLCouldn‘t find MySQL server (/usr/local/mysql/[失败]sqld_safe)
vi /etc/init.d/mysqld,添加路径
5:杀掉进程,启动mysqld
[root@centos 6 mysql]# killall mysqld
[root@centos 6 mysql]# /etc/init.d/mysqld start
Starting MySQL.. [确定]
注意:登录不上,可能没有配置文件需要
cp support-files/my-small.cnf /etc/my.cnf
killall mysqld
/etc/init.d/mysqld start
6:设置密码 [root@centos 6 mysql]# /application/mysql/bin/mysqladmin -u root password ‘111111‘
7:登录mysql mysql -uroot -p111111
8:mysqld 提示
①vi /etc/profile
PATH=/application/mysql/bin:$PATH
退出vi 执行. /etc/profile即可
②也可以 cp /application/mysql/bin/* /usr/local/sbin/
9:
data目录下查看错误
10:优化数据库
mysql> drop database test;
mysql> select user,host from mysql.user;
mysql> drop user ‘root‘@‘::1‘;
mysql> drop user ‘‘@‘centos \6‘;
mysql> drop user ‘root‘@‘centos \6‘;
mysql> drop user ‘‘@‘localhost‘;
mysql> select user,host from mysql.user;
11:
创建用户
mysql> grant all on *.* to daixubinbin@‘A‘ identified by ‘123‘;
删除用户
mysql> drop user ‘daixubinbin‘@‘a‘;删除如果报错,使用sql语句
mysql> delect from mysql.user where user=‘daixubinbin‘ and host=‘a‘;
常见问题
yum -devel
chmod -R 4777 /tmp
登不上:
初始化DB不正常 rm -rf /application/mysql/data/ mysql_install_db......
看data/..err日志
MySQL二进制安装
标签:support evel use 直接 server usr 拷贝 mic 创建