XAMPP set root user password for MariaDB

前端 未结 3 976
醉梦人生
醉梦人生 2021-01-28 14:22

How do you set the root user password for MariaDB in XAMPP on Ubuntu/Kubuntu 16.04?

By default the root user does not have a password set.

I\'m using XAMPP 7.1.1

相关标签:
3条回答
  • 2021-01-28 14:59

    I managed to do it on both Windows and Linux. On Windows, open command prompt, change directory to \xampp\mysql\bin and use mysqladmin to set password for root user i.e.

    cd \xampp\mysql\bin
    mysqladmin --user=root password "your_password"
    

    On Linux (Ubuntu/Kubuntu), open terminal emulator and change directory to /opt/lampp/bin i.e.

    cd /opt/lampp/bin
    ./mysqladmin --user=root password "your_password"
    
    0 讨论(0)
  • 2021-01-28 15:14

    I had the same problem fixed it like this:

    sudo mysqld_safe --skip-grant-tables &
    mysql -u root
    use mysql;
    update user set password=PASSWORD("mynewpassword") where User='root';
    update user set plugin="mysql_native_password";
    quit;
    

    Restart the database and you are good.

    Key was this line:

    update user set plugin="mysql_native_password";
    
    0 讨论(0)
  • 2021-01-28 15:19

    This link to Meer's World made it easy for me because it's done through the phpMyAdmin screens directly and then the config.inc.php file. I tried the SQL query and command line methods described elsewhere and none worked properly. This was easy.

    0 讨论(0)
提交回复
热议问题