Linux 安装Mysql 常见错误及总结

本文档详细介绍了MySQL数据库的安装、初始化、配置、启动、登录、用户权限管理和远程登录配置步骤。在安装过程中遇到的错误提示以及解决方法也进行了说明。重点强调了my.cnf配置文件的内容,包括日志设置、数据缓存大小和用户权限设定。此外,还涵盖了用户创建、权限赋予和回收,以及密码修改的操作。最后,提到了开启远程连接所需的配置和权限设置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1,安装的方法菜鸟教程上有:入口

mysqld --initialize
#命令是出现如下错误Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

2,数据库初始化

默认情况下,数据已经初始化好,数据可参见默认配置文件/etc/my.cnf

在其他位置重新初始化MySQL数据库:

basedir是mysql的安装根目录,ldata是数据初始化的目录

mysql_install_db --basedir=/ --ldata=./data

相关提示:

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

  mysqladmin -u root password 'new-password'
  mysqladmin -u root -h gzns-map-tc-spd-server-shanghai00.gzns.baidu.com password 'new-password'

Alternatively you can run:

  mysql_secure_installation

which will also give you the option of removing the test
databa
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值