mysql 服务器要求_mysql 服务器配置
Windows:
1.在bin目录下执行mysqld.exe –install-manual安装服务(删除命令是mysqld.exe –remove)
2.执行net start mysql启动服务(停止服务net stop mysql)
3.修改root密码,执行mysqladmin -uroot -p password后先输入默认密码然后输入新密码(默认密码为空)
Linux:
1.解压MySQL-5.6.25-1.linux_glibc2.5.i386.rpm-bundle.tar(tar -xvf MySQL-5.6.25-1.linux_glibc2.5.i386.rpm-bundle.tar)
2.检查系统中是否已安装mysql(rpm -qa|grep -i mysql)
3.安装mysql服务端(rpm -ivh MySQL-server-5.6.25-1.linux_glibc2.5.i386.rpm),若提示error: Failed dependencies: libaio.so.1 is needed ,则执行 yum install libaio
4.启动mysql服务(service mysql start)
5.检测mysql是否启动成功(/etc/rc.d/init.d/mysql status)
6.登陆,默认会为root生成一个随机密码,在/root/.mysql_secret里
7.允许root远程连接(否则连接报错host is not allowed to connect mysql):mysql>GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘root’ WITH GRANT OPTION;(可能会要求先修改密码,执行SET PASSWORD = PASSWORD(‘123456’); )
8.修改默认密码:mysql>update user set password=PASSWORD(‘123456′) where user=’root’; mysql>FLUSH PRIVILEGES;