数据库操作

时间:2014-01-21 21:32:43   收藏:0   阅读:478

1.远程访问

  mysql -u root -pmypassword -h 192.168.1.88 -P 3306 -D mydb

2. 访问授权

  mysql>grant select,insert,update,delete,create,drop on mydb.mytable to remoteuser@192.168.1.88 identified by ‘mypassword‘;

4. 创建服务

mysqld –install MysqlService

net start MysqlService

net stop MysqlService

5. 修改数据目录

将data、share两个目录复制到新目录下,重启服务即可。

 

6. 找回mysql的root密码

http://database.51cto.com/art/201005/202227.htm

7. 创建用户

create database database_name;

grant all on database_name.* to user_name@‘%‘ identified by ‘user_password‘;

flush privileges;

8. 远程访问问题

http://blog.csdn.net/mydeman/article/details/3847695

     注释my.cnf中的bind_address = 127.0.0.1配置。

9. 导入源数据

source D:\data.sql

原文:http://www.cnblogs.com/javawer/p/3528790.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!