• Ubuntu 下安装Mysql 需要注意的地方.


    安装卸载

    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/ 磁力搜索引擎

  • 相关阅读:
    CentOS LiveCD LiveDVD DVD 等版本的区别
    解决蛋疼的阿里云单CPU使用率的问题。
    软件工程在北航
    Introduction of Team Member
    proxool的配置
    hibernate配置jndi
    dbcp的配置
    绘制图片
    myeclipse搭建svn插件
    svn搭建
  • 原文地址:https://www.cnblogs.com/jexus/p/4786560.html
Copyright © 2020-2023  润新知