通过yum安装的mysql,启动和增加数据库,增加数据如下: [root@wucl-4 lib]# systemctl start mariadb [root@wucl-4 lib]# mysql -uroot Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 5.5.52-MariaDB MariaDB Server Copyrig…
最近在弄一个项目,需要修改windows下面的mysql的数据目录(mysql默认是存储在C盘的,这个不太好,未来一定会满了的). 我的 mysql 是安装版,版本是 5.7. 1.首先,需要知道mysql的原数据目录在哪里: -- 使用sql查询数据目录 show global variables like '%datadir%'; 另外还有一个办法,就是通过服务去查看: 计算机-->管理-->服务和应用程序-->找到mysql服务,右键属性,找到my.ini文件(如下图),打开那个文…