linux配置Mysql

作者: Du1in9 | 来源:发表于2020-04-04 13:31 被阅读0次

    安装步骤

    apt-get install mariadb-client
    apt-get install mariadb-server
    

    配置文件

    vi /etc/mysql/my.cnf
    
    [client-server]
    default-character-set=utf8
    
    port = 3306
    socket    = /tmp/mysql.sock
    
    [mysql]
    default-character-set=utf8
    
    [mysqld]
    basedir=/usr/local/mysql/
    datadir=/usr/local/mysql/data/mysql
    #character-set-server=utf8
    

    编辑完记得保存,esc,:wq!,回车


    图片.png

    设置开机自启

    systemctl enable mysql
    

    设置开机不启动

    systemctl diable mysql
    

    相关文章

      网友评论

        本文标题:linux配置Mysql

        本文链接:https://www.haomeiwen.com/subject/edudphtx.html