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

  • 相关阅读:
    arm gdbserver armlinuxgdb
    建立非模态对话框与在线程中建立非模态对话框
    AutoLock C++
    Uboot bootcmd 和bootargs
    SetRegistryKey
    飞凌OK6410 uboot支持网络
    uboot 源码修改 bootcmd,IP ,BOOTARGS等参数
    TextBox(richTextBox) 光标和滚动条到文本末尾
    Windbg中使用查找内存并设置访问断点
    opencv EXAMPLES 编译 VS2010 (C++)
  • 原文地址:https://www.cnblogs.com/jexus/p/4786560.html
Copyright © 2020-2023  润新知