I have installed the Production VM of ERPNext.
Is there any clear step-by-step document to access the DB using Mysql Workbench or any other tool?
I looked for a solution through tens of documents and failed for many reasons;
steps, not complete
data such as default passwords don’t work
This area of ERPNext is not explained well such as other functional subjects
Looking for your appreciated support
Thanks | Regards,
there is an easy way: access MariaDB through the bench console, add a DB user, exit and use that user.
$ bench mariadb
> CREATE USER 'you'@'%' IDENTIFIED BY '*****';
> GRANT ALL PRIVILEGES ON *.* TO 'you'@'%' WITH GRANT OPTION;
Change you with your access name and ***** with your password.
In case you are not using the localhost for the Workbench (which you are using according to the screenshot) also remember to comment out the bind-address in the MaraiDB config.
Hope this helps.
Make sure you have the ports forwarded in the VM.
Thanks for your feedback
It does not work due to that MariaDB user does not have the privileges to create new users as screenshot
Your recommendation is highly appreciated
Thanks for the advise
however this step does not solve the access issue
just had this checked and it really no longer works sorry. Try this and it will work:
$ sudo mysql
> CREATE USER 'magdy'@'%' IDENTIFIED BY 'password';
> GRANT ALL PRIVILEGES ON *.* TO 'magdy'@'%' WITH GRANT OPTION;
Hope this helps.
I tried it however still not working as per below screenshot
I believe you got my point
This area not covered well. it depends on try and error with support of kind peers like you
I will continue to search for a solution
Normally mysql can be accessed from Terminal using the command >> sudo mysql -u root -p
Seems like you have some root access issue for the localhost… to reset the mysql root password you need to login to mysql without password…
first stop the mariadb server
sudo /etc/init.d/mysql stop
then start without password
sudo mysqld_safe --skip-grant-tables &
then connect to db
then use the default db and set new password
update user set authentication_string=PASSWORD(“mynewpassword”) where User=‘root’;
then start mariadb
sudo systemctl restart mariadb
then check the status
sudo systemctl status mariadb
if it starts running connect the server again using the new password
sudo mysql -u root -p
You could try via SSH pipe. I am not sure of the post on the VM, but this post may give a useful dirction to move in