This is beyond the scope of the question but next I would be looking into hooking the unix user creation process to automatically creating a matching MySQL user account. Towards this end, I took the following steps: I opened the terminal and typed in su - to run as root. ![]() The syntax is as follows for Unix like operating system. Step 1 Checking the version of Database Server rootserver mysql -version mysql Ver 15.1 Distrib 5.5.52-MariaDB, for Linux (x8664) using readline 5. Run the following commands if you run MySQL 5.7.6 and later or MariaDB 10.1.20 and later. I also created a MySQL account with the same username as my unix account, again with no password, and using the root account I granted it access to the tables I needed, then I could also connect from apps from my user account without changing to root. Type the following command at the shell prompt to login as a root user. To test open a new Terminal and do sudo su then mysql and check if it connects with no password (this didn't work when a password was set). Type following passwd command command to change your own password: passwd Sample Outputs: Changing password for vivek (current) UNIX password: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully The user is first prompted for her old password if one is present. I connected as root using the password then ran: ![]() To execute the instructions in this tutorial, you need access to the Linux command line or SSH. I also created a root password at installation and wanted to change back to using unix authentication once I understood that if I run commands or launch apps as root they can connect to the database without any password which is much simpler than having another password. In this tutorial, we cover the following topic: 1) set and change MySQL password (root and user password) in Linux operating system, such as centOS, AlmaLinux and recover it if you forget it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |