随笔分类 - MYSQL
摘要:1、按条件查询表中数据: mysql> select user,host,password from MyTable; 2、按组合条件查询表中数据: mysql> select id, password, username, concat(first_name,' ',last_name)as fu
阅读全文
摘要:1、按条件查询表中数据: mysql> select user,host,password from user; 2、按组合条件查询表中数据: mysql> select id, password, username, concat(first_name,' ',last_name)as full_
阅读全文
摘要:因为系统分区的空间不足,添加了一块硬盘,挂载到/data目录下,把MySQL的数据目录(data)迁移过去。 1、停止MySQL服务: 2、在新分区中创建MySQL目录: 3、把data目录拷贝到新的分区中: 4、修改权限(mysql的运行账户为“mysql“用户),否则MySQL启动会报错: 5、
阅读全文
摘要:1、修改root用户登录密码: [root@175 bin]# /usr/local/mysql/bin/mysqladmin -u root password 'MyPassword' mysql> set password for 'root'@'localhost' = password('M
阅读全文