| 关键词: MySQL egroupware 运行 密码 root grant password Windows 数据库 mysqld |
1、首先停止正在运行的MySQL进程 Linux下,运行 killall -TERM mysqld Windows下,如果写成服务的 可以运行:net stop mysql,如未加载为服务,可直接在进程管理器中进行关闭。 2、以安全模式启动MySQL Linux下,运行 /usr/local/mysql/bin/mysqld_safe --skip-grant-tables & Windows下,在命令行下运行 X:/MySQL/bin/mysqld-nt.exe --skip-grant-tables 3、完成以后就可以不用密码进入MySQL了 Linux下,运行 /usr/local/mysql/bin/mysql -u root -p 进入 Windows下,运行 X:/MySQL/bin/mysql -u root -p 进入 4、更改密码 >use mysql >update user set password=password("新密码") where user="root"; >flush privileges; 注:如是4.1以上版本则使用old_password()函数进行密码更改。 安装 MySQL 数据库 如果已经安装了的可以省略这一步: sudo apt-get install mysql-server 然后设置根用户密码并创建 egroupware 数据库,并将该数据库的权限设置给 egroupware 用户。 mysql -u root >GRANT ALL ON *.* TO root@localhost IDENTIFIED BY 'root321'; >CREATE DATABASE egroupware; >GRANT ALL ON egroupware.* TO egroupware@localhost IDENTIFIED BY 'egroupware'; >exit |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|