

$ ALTER USER IDENTIFIED WITH mysql_native_password BY 'password' $ CREATE USER IDENTIFIED WITH mysql_native_password BY 'password' $ GRANT ALL PRIVILEGES ON *.* TO WITH GRANT OPTION $ CREATE USER IDENTIFIED BY 'DevOpsSchool$123' Step 3 - Creating a Dedicated MySQL User and Granting Privileges This script changes some of the less secure default options for things like remote root logins and sample users. To install it, update the package index on your server if you’ve not done so recently:Įnsure that the server is running using the systemctl start command:įor fresh installations of MySQL, you’ll want to run the DBMS’s included security script. alias mysql='cd /Applications/XAMPP/xamppfiles/bin. If you have never setup a bash_profile enter open ~/.bash_profile into the terminal and you can modify bash aliases here. Be sure to utilize shortcuts - I have an alias set up in my bash_profile so I just have to type in mysql to get into my XAMPP MySQL command line. Please correct me if wrong gathered the Windows and Linux commands through a quick Google search. Linux /opt/lampp/bin/mysql -user=root -password= /Program Files/xampp/mysql/bin/mysql.exe -user=root -password= Mac cd /Applications/XAMPP/xamppfiles/bin.

Here is how you can quickly access the XAMPP MySQL command line (assuming you didn't change default installation paths, of course) :

In order to access MySQL via command line you have to navigate to XAMPP's files directory and locate the bin or executable. However in a development situation you may have used XAMPP which bundles it all together for you and you can't just access the XAMPP MySQL command line through a registered path. Typically when you set up a web server you would have installed MySQL as its own service and can easily access the MySQL command line via mysql (mysql.exe). MySQL command line allows you to manage your database environment through your terminal, or command prompt for Windows.
