linux 开机启动

# cp /home/mysql/support-files/mysql.server /etc/init.d/mysqld      # 拷贝启动文件到/etc/init.d/下并重命令为mysqld
# chmod 755 /etc/init.d/mysqld                                      # 增加执行权限
# chkconfig  --list mysqld                                           # 检查自启动项列表中没有mysqld这个,
# chkconfig  --add mysqld                                            # 如果没有就添加mysqld:
# chkconfig mysqld  on                                                # 用这个命令设置开机启动:
如果在执行第一步就报错,则说明刚刚在第8步中配置出问题了,那你就重新设置一下





如果在执行第一步就报错,则说明刚刚在第8步中配置出问题了,那你就重新设置一下

做完这步后再重新执行下上面的操作

如果后面的操作中出现以下的问题

这样就是电脑环境的问题了,你就直接把

 

10、mysql服务的启动/重启/停止
1
2
3
# service mysqld start                                               # 启动服务
# service mysqld restart                                             # 重启服务
# service mysqld stop                                                # 停止服务
11、初始化mysql用户root的密码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# cd /home/mysql
# ./bin/mysqladmin -u root -p  '**mjT,#x_5sW'  password  '123456'  mysqladmin:                                         # 刚刚之前的初始密码
[Warning] Using a  passwrd  on  the command line interface can be insecure.
Warning: Since  password  will be sent  to  server  in  plain text, use ssl  connection  to  ensure  password  safety.
mysql> use mysql
Database  changed
mysql>  update  user  set  authentication_string =  PASSWORD

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值