Have children shoes asked said, the environment is set up, MySQL also installed, but is not into the database, also start not, has been error, then the following here is how to use the Navicat link to create a database
First of all
1) in the Xshell into MySQL, the command is: Mysql-u root-p, and then enter into the MySQL.
2) then enter the command: Use MySQL, switch to the MySQL database as follows:
3) then enter the following command to query all user tables that can log in to the database:
Select Host,user,password from user; Be sure to remember that each SQL statement is preceded by a corresponding semicolon. As shown in the following:
Here can be seen only native access to MySQL, if you want to external access to MySQL, then host should be displayed in%, so here we can choose to recreate a user and grant the highest permissions, the statement is as follows:
Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT option; This is the password to the root account is set to 123456 and the host is%, that is, any external host can be accessed.
* * This is intended to be the database name. Table name, we do not write any table name here or write the database name, meaning that all databases can be accessed with this root account
Flush privileges;//Make the permissions you just modified take effect
Then the next step is to restart the MySQL service and go back to MySQL and use the query to view the user table as follows:
That way, the database account is created.
The account password is also available.
Then you can link it with Navicat.
If you encounter or do not open Tomcat or other error, it is recommended to restart the Linux, and then restart the next Tomcat server
After rebooting Tomcat and discovering that the page still has no data, we can consider killing the tomcat process and restarting it. Because I also encounter this situation, kill the Tomcat process and then restart, you can see the data, the problem of the pro can follow. The command line is as follows:
Ps-ef|grep Tomcat or Ps-ef|grep Java, see the following:
1) then kill the Tomcat process with a command: Kill-9 26257 (using: kill-9 port number)
Finally reboot Tomcat to see the data!
2) The second method of turning off Tomcat, under Tomcat's bin path, can be executed directly: shutdown.sh, or you can turn Tomcat off and restart again.
Issue 2: Every time you restart Tomcat, it is not simple./startup.sh run, we have to kill the process first, and then restart, so that less encounter errors.
Issue 3: When you start Tomcat, be sure to turn on the log at the same time to view it. is to open a new window, run./catalina.sh run, you can see the log, and can quickly locate the error.
MySQL Database link and create