加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

linux下mysql安装、目录结构、配置

发布时间:2020-12-15 07:19:12 所属栏目:安全 来源:网络整理
导读:[root@localhost?/]#rpm?-ivh?MySQL-server-community-5.1.44-1.rhel4.i386.rpm;[root@localhost?/]#rpm?-ivh?MySQL-client-community-5.1.44-1.rhel4.i386.rpm; [root@localhost?/]#netstat?-ntpl; [root@localhost?/]#/usr/bin/mysqladmin?-u?root?passwor

[root@localhost?/]#rpm?-ivh?MySQL-server-community-5.1.44-1.rhel4.i386.rpm;[root@localhost?/]#rpm?-ivh?MySQL-client-community-5.1.44-1.rhel4.i386.rpm;

[root@localhost?/]#netstat?-ntpl;

[root@localhost?/]#/usr/bin/mysqladmin?-u?root?password?'xxxxxx';[root@localhost?/]#mysql?-u?root?-pEnter?password:xxxxxx

表示登陆成功!

mysql>use?mysql;mysql>update?user?set?host?='%'?where?user?='root';mysql>select?host,user?from?user;mysql>FLUSH?PRIVILEGES

mysql>GRANT?ALL?RRIVILEGES?ON?*.*?TO?username@'%'?IDENTIFIED?BY?'password'?WITH?GRANT?OPTION;mysql>FLUSH?PRIVILEGES;

[root@localhost?/]#service?mysql?stop;[root@localhost?/]#service?mysql?start;

[root@localhost?/]#show?variables?like?'character_set_%';[root@localhost?/]#show?variables?like?'collation_%';

[root@localhost?/]#rpm?-qa|grep?-i?mysql

MySQL-server-community-5.1.44-1.rhel4.i386.rpmMySQL-client-community-5.1.44-1.rhel4.i386.rpm[root@localhost?/]#rpm?-e??MySQL-server-community-5.1.44-1.rhel4.i386.rpm[root@localhost?/]#rpm?-e?MySQL-client-community-5.1.44-1.rhel4.i386.rpm

[root@localhost?/]#rm?-f?/etc/my.cnf[root@localhost?/]#rm?-f?/var/lib/mysql

shell>mysqldump?source_db?-uroot?-pxxxxxx?--opt?|?mysql?target_db?-uroot?-pxxxxxx?-h?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读