mysql相关

    xiaoxiao2021-03-25  46

    rpm安装:

    yum install -y mysql-server mysql mysql-devel

    mysql编译安装

    ./configure --prefix=/usr/local/mysql -with-charset=utf8--with-extra-charsets=complex --enable-thread-safe-client  --with-big-tables --with-ssl--with-embedded-server --enable-local-infile --enable-assembler--with-plugins=innobase --with-plugins=partition

    make

    make install

    mysql设置

    /etc/my.cnf 忽略大小写 lower_case_table_names=1 BLOB大小  一,Windows通过文件my.ini (在系统盘) [mysqld] set-variable = max_allowed_packet=10M 二,linux通过etc/my.cnf [mysqld] max_allowed_packet = 16M 开机启动 chkconfig mysqld on

    chkconfig --list

    备份

    mysqldump  -u 用户名 -p databasename >exportfilename

    还原

    source exportfilename

    连接报错

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

    mysql指定ip远程登录

    任意主机以用户root和密码mypwd连接到mysql服务器

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypwd' WITH GRANT OPTION;FLUSH PRIVILEGES;

    IP为192.168.1.102的主机以用户myuser和密码mypwd连接到mysql服务器

    GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.102' IDENTIFIED BY 'mypwd' WITH GRANT OPTION;

    FLUSH PRIVILEGES;

    mysql优化相关的文章

    http://lib.csdn.net/article/14/36297?knId=372

    转载请注明原文地址: https://ju.6miu.com/read-50269.html

    最新回复(0)