安装卸载

sudo apt-get autoremove --purge mysql-server-5.0
sudo apt-get remove mysql-server
sudo apt-get autoremove mysql-server
sudo apt-get remove mysql-common //这个很重要

sudo apt-get install mysql-server

sudo apt-get install mysql-client

sudo apt-get install php5-mysql

配置mysql允许远程连接

sudo vi /etc/mysql/my.cnf,在[mysqld] bind_address=127.0.0.1     # 注释掉这一行 , 否则远程连接可能会连接不上.

GRANT ALL PRIVILEGES ON 表名.* TO t_dy_root@"%" IDENTIFIED BY "密码";   # 添加一个用户,任意主机可以连接
flush privileges; # 刷新权限

mysql密码重置

sudo vi /etc/mysql/my.cnf,在[mysqld]段中加入一行“skip-grant-tables”

sudo service mysql restart,重启mySQL服务

sudo mysql -u root -p mysql,用空密码进入mysql管理命令行

use mysql    #切换数据库

update user set password=password("新密码") where user="root";  #设置新密码

phpMyAdmin连接多台主机的MySql

修改config.inc.php文件

$i++;
$cfg['Servers'][$i]['verbose'] = 'host1';          # 第一个主机, verbose 是显示的主机名字
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['compress'] = true;

$i++;
$cfg['Servers'][$i]['verbose'] = 'host2';       # 第二个主机, verbose 是显示的主机名字
$cfg['Servers'][$i]['host'] = 'x.x.x.x';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['compress'] = true;

http://www.okbt.net/ 磁力搜索引擎

Ubuntu 下安装Mysql 需要注意的地方.的更多相关文章

  1. Ubuntu 下安装 Mysql

    这里讲用Ubuntu下安装MySql ubuntu上安装mysql非常简单只需要几条命令就可以完成. 1. sudo apt-get install mysql-server   2. apt-get ...

  2. Ubuntu下安装MySQL 5.6.23

    Ubuntu下安装MySQL 5.6.23 1.下载相应Linux-generic的源代码包.解压,将解压后的文件夹重命名为mysql.移动到/usr/local文件夹下: tar –xzf mysq ...

  3. Ubuntu下安装mysql与mysql workbench

    Ubuntu 安装jdk:[链接] Ubuntu安装eclipse:[链接] Ubuntu下安装MySQL与mysql workbench:[链接] Ubuntu配置tomcat9:[链接] 1.su ...

  4. ubuntu下安装mysql和配置远程访问

    ubuntu下安装mysql和配置远程访问   下载安装mysql sudo apt-get install mysql-client mysql-server 安装的时候会提示要设置root密码,如 ...

  5. ubuntu下安装mysql

    现在的软件越来越好安装,尤其是在ubuntu下安装软件,更是没有技巧,只需要在联网的情况下使用apt-get inatll 即可.在决定安装mysql之前,要先确定系统是否已经安装mysql.如下图: ...

  6. (抓)ubuntu下安装mysql --- 我主要参考的文章

    转:http://cycnet.blog.51cto.com/117809/812625 现在的软件越来越好安装,尤其是在ubuntu下安装软件,更是没有技巧,只需要在联网的情况下使用apt-get ...

  7. ubuntu 下安装mysql,以及配置远程登录

    安装MysQL 在Ubuntu14.04下安装MySQL比较简单,只需下面这条命令就行了: 1.输入 sudo apt-get install mysql-server 2.继续执行后,需要设定MyS ...

  8. Ubuntu下安装MySQL及简单操作

    Ubuntu上安装MySQL非常简单只需要几条命令就可以完成. 1. sudo apt-get install mysql-server 2. apt-get isntall mysql-client ...

  9. Ubuntu 下安装mysql

    本文引用自 https://www.cnblogs.com/jpfss/p/7944622.html 此篇为http://www.cnblogs.com/EasonJim/p/7139275.html ...

随机推荐

  1. 查看Oracle中是否有锁表的sql

    1.查看是否有锁表的sql 代码如下: select 'blocker('||lb.sid||':'||sb.username||')-sql:'|| qb.sql_text blockers, 'w ...

  2. 微软2016校园招聘4月在线笔试 A FontSize

    题目链接:http://hihocoder.com/problemset/problem/1288 分析:题目中所求的是最大的FontSize(记为S),其应该满足P*[W/S]*[H/S] > ...

  3. NC 查询公司下所分配的组织,并存放字符串数组中

    private String[] querkFather() { String sql = "select pk_org from org_orgs start with pk_father ...

  4. checkbox、全选反选,获取值

    <input id="Chk_All" onclick="CheckAll()" type="checkbox" /> < ...

  5. redis迁移工具-redis-migrate-tool使用测试

    https://github.com/vipshop/redis-migrate-tool一.安装redis-migrate-tool a.下载redis-migrate-tool软件包 https: ...

  6. 猿团YTFCloud生态系统,全面服务创业者

    9月15日,YTFCloud已正式开启了内测. 创业者翘首以待的YTFCloud,虽然让部分创业者感受到了它的神奇,但对于更多暂时无法尝试的创业者来说,它依然有一层神秘的面纱. 今天小编就来带你近距离 ...

  7. Win7 64位qt-windows-x86-msvc2015-5.6.0 DLL依赖库打包

    今天开始系统的学习QT,第一个测试的问题就是在纯净的系统中如何正常运行,也就是找出QT生成的exe的依赖库问题 网上搜了下可以简单粗暴的用 D:\Qt\Qt5.6.0\5.6\msvc2015\bin ...

  8. Docker ntpdate Permition error

    After building a Dockerfile, I run it. I figure out that there is something wrong with local time. S ...

  9. 「2014-3-18」multi-pattern string match using aho-corasick

    我是擅(倾)长(向)把一篇文章写成杂文的.毕竟,写博客记录生活点滴,比不得发 paper,要求字斟句酌八股结构到位:风格偏杂文一点,也是没人拒稿的.这么说来,arxiv 就好比是 paper 世界的博 ...

  10. Windows Phone 8.1 新特性 - 控件之列表选择控件

    本篇我们来介绍Windows Phone 8.1 新特性中的列表选择控件. 在Windows Phone 8 时代,大家都会使用 LongListSelector 来实现列表选择控件,对数据进行分组显 ...