Project deployment Documentation-database import, tomcat configuration

Source: Internet
Author: User
Tags documentation import database

Common Operations

To view the MySQL encoding format: Show variables like ' character% ';

Modification of the encoding format : The My.ini file needs to be modified in the MySQL installation directory UTF8

Import Database SQL: mysql-u root-p123456 test <d:\a.sql specifically see below

Tomcat configures working directory in other locations

① Create your own program directory myjsp outside of the WebApps directory where you need it (such as the e-packing directory).
② the Web-inf in the Webapps->root directory together with the files under it to myjsp.
③ Copy the myfirst.jsp file you just wrote to the directory.
④ Open the Server.xml in the webapps->conf directory and add the following code between the <Host></Host> tags:
<context path= "/test" docbase= "E:\myjsp" debug= "0" reloadable= "true" crosscontext= "true" >
</Context>
Note: The previous statement must be aware of the case, change the configuration file Server.xml must restart the Tomcat service. /test can be replaced with any name you want, docbase followed by the physical path of your program directory.
④ Enter the address in the browser address bar: http://localhost:8080/test/myfirst.jsp for access.

MySQL database import specific actions are as follows:

1. First open MySQL in the command line console

Perhaps the order is as follows:
Mysql-u root-p database_name
You may then be prompted to enter the corresponding password
2. The following command may be useful for you when you want to change a database
Mysql>use database_name
Then use the following command
Mysql>source D:\datafilename.sql
Of course you need to figure out the path to the file and use it correctly.
Go to the subdirectory bin of the directory where the MySQL installation resides. Enter the command to execute the import SQL.
For example: Your MySQL is installed in D:\mysql
The steps are as follows:
Start-to-run input cmd
D:
CD Mysql\bin
Mysql-u root-p123456 Test <d:\a.sql
Where root is your MySQL administrator user name, 123456 is the password test for the database name D:\a.sql is the location of the backed up data file.
If it is windows, execute the command from the command prompt to the bin folder in the MySQL file directory
Mysql-u root-p DatabaseName < Db.sql
Where root is your MySQL username, DatabaseName is the name of your database, and db.sql you are the file. Note You have to put Db.sql in the Bin folder. Of course, the location of the file can be changed.
If it's Linux, enter it directly.

Project deployment Documentation-database import, tomcat configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.