安装卸载

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. JAVA第4次作业

    package fuzhi; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOExc ...

  2. HTML5之语义标签

    在HTML5标准中,新加了几个用于增添页面语义的标签,这些标签有:article.section.nav和aside等.与别的大多数标签不 同,浏览器在解释渲染这些标签的时候仅仅把它作为普通的div块 ...

  3. 陨石坑之webapi使用filter

    首先为什么说这是一个坑,是因为我们在webapi中使用filter的时候也许会先百度一下,好吧,挖坑的来了,我看了好几篇文章写的是使用System.Web.Mvc.Filters.ActionFilt ...

  4. C语言之数组,字符串,指针

    一. 数组的定义 1.  数组初始化 初始化方式 int a[3] = {10, 9, 6}; int a[3] = {10,9}; int a[] = {11, 7, 6}; int a[4] = ...

  5. Rails中的content_tag与concat用法,可以连接任意html元素

    想输出如下html <% if user.present? %> <li> <a href="<%= user_info_url(user.id) %&g ...

  6. html5 完整图片上传

    <div class="photo" style="display:none;" id="upPhoto"><div cl ...

  7. WebView 上传文件 WebChromeClient之openFileChooser函数

    原链接:http://blog.saymagic.cn/2015/11/08/webview-upload.html?utm_source=tuicool&utm_medium=referra ...

  8. <<UML大战需求分析>>阅读笔记(2)

    <<UML大战需求分析>>阅读笔记(2)> 此次读了uml大战需求分析的第三四章,我发现这本书讲的特别的好,由于这学期正在学习设计模式这本书,这本书就讲究对uml图的利用 ...

  9. AVL-tree

    //avl.h#ifndef __AVL_H__#define __AVL_H__ typedef int KEY_TYPE; /* struct */typedef struct AVL{ KEY_ ...

  10. 在app中打开appStore中其他app

    var str = "https://itunes.apple.com/cn/app/zhang-jiange-hao-tou-zi-ke/id402382976?mt=8"//这 ...