You can only access to database in local host, if you install ZenTao via one-click installation. This is the default setting. Next, we will talk about how to configure remote host to access ZenTao database.
Before we start, make sure
- ZenTao is normal and you can access the database;
- If the remote host cannot access to ZenTao and its database, check the connection and firewalls.
- Due to security reasons, it is not recommended that you access to ZenTao database using remote hosts.
1. For Windows one-click installation, use a remote host to access MySQL.
1.1 Add an account. Its name is root and its host is % to a database.
Use ZenTao local host and visit http://127.0.0.1. Click MySQL on the login page and login ZenTao adminer.
Go to MySQL and open Table user. Add a record with % as the host. If only an address will be allowed to have access to the database, change % to the IP address that is allowed.
Or you can execute the following in Table user of MySQL.
INSERT INTO `mysql`.`user` ( `Host` , `User` , `Password` , `Select_priv` , `Insert_priv` , `Update_priv` , `Delete_priv` , `Create_priv` , `Drop_priv` , `Reload_priv` , `Shutdown_priv` , `Process_priv` , `File_priv` , `Grant_priv` , `References_priv` , `Index_priv` , `Alter_priv` , `Show_db_priv` , `Super_priv` , `Create_tmp_table_priv` , `Lock_tables_priv` , `Execute_priv` , `Repl_slave_priv` , `Repl_client_priv` , `Create_view_priv` , `Show_view_priv` , `Create_routine_priv` , `Alter_routine_priv` , `Create_user_priv` , `Event_priv` , `Trigger_priv` , `Create_tablespace_priv` , `ssl_type` , `max_questions` , `max_updates` , `max_connections` , `max_user_connections` , `plugin` , `authentication_string` ) VALUES ( '%', 'root', '', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '0', '0', '0', '0', '', '' );
1.2 Comment bind-address= 127.0.0.1
Go to xampp/mysql/my.ini and comment bind-address= 127.0.0.1. If it doesn't exist, just skip it.
1.3 Flush privilege in MySQL
Execute FLUSH PRIVILEGES in MySQL or restart MySQL.
2. For Linux on-click installation
2.1 Add an account. Its name is root and its host is % to database.
Use ZenTao local host and visit http://127.0.0.1. The default account name of ZenTao database is root and its password is 123456.
SCREENSHOT
Go to MySQL and open Table user. Add a record with % as the host. If only an address will be allowed to have access to the database, change % to the IP address that is allowed.
Or you can execute the following in Table user of MySQL.
INSERT INTO `mysql`.`user` ( `Host` , `User` , `Password` , `Select_priv` , `Insert_priv` , `Update_priv` , `Delete_priv` , `Create_priv` , `Drop_priv` , `Reload_priv` , `Shutdown_priv` , `Process_priv` , `File_priv` , `Grant_priv` , `References_priv` , `Index_priv` , `Alter_priv` , `Show_db_priv` , `Super_priv` , `Create_tmp_table_priv` , `Lock_tables_priv` , `Execute_priv` , `Repl_slave_priv` , `Repl_client_priv` , `Create_view_priv` , `Show_view_priv` , `Create_routine_priv` , `Alter_routine_priv` , `Create_user_priv` , `Event_priv` , `Trigger_priv` , `Create_tablespace_priv` , `ssl_type` , `max_questions` , `max_updates` , `max_connections` , `max_user_connections` , `plugin` , `authentication_string` ) VALUES ( '%', 'root', '', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '0', '0', '0', '0', '', '' );
2.2 Comment bind-address= 127.0.0.1
Go to opt/zbox/etc/mysql/my.cnf and comment bind-address= 127.0.0.1. If it doesn't exist, just skip it.
1.3 Flush privilege in MySQL
Execute FLUSH PRIVILEGES in MySQL or restart MySQL.