Talk about my management of code, deployment, Release (PHP)---WAMP

Source: Internet
Author: User
Tags website server import database mysql command line phpmyadmin

Some configuration and usage experiences of WAMP (MYSQL)

At the beginning of contact with the database, I always think that database operations tools and databases are the same thing, they are one, and later I understand that the database is a separate warehouse, with the words of Baidu Encyclopedia to explain

A database is a warehouse that organizes, stores, and manages data according to a data structure, which is a repository for the storage, even if there are no database manipulation tools, such as SQL server2005 from SQL Server, and MySQL's phpMyAdmin, Navicat, and so on, as can be the operation of the database, then we should how to operate, the answer is the command line, which is my slowly fall in love with the command line of one of the main reasons, all the graphics interface is difficult to achieve, at the command line is easy, then how should we use MySQL command line?

MySQL command line

After installing the Wamp, the Mysql.exe execution file should (. *) \wamp\bin\mysql\mysql5.6.12\bin this directory, First use the Open command line into the Mysql.exe directory, of course you can also configure the environment variable to avoid this tedious action, only by personal preference, and then enter

Mysql-uroot-p (Note: Root is your user name, usually root, if you have modified it, it could be another string)

You will then be prompted to enter your password

After completion will appear welcome to MySQL Monitor and other words, and then you can do SQL operations, the general first is the first use of database (your name of the databases), and then set NAMES UTF8, character encoding, Then is the Caud, such as the operation, such as create Table;showtables, and so on, specifically not detailed, but especially to remember a point: every time you input SQL Caud command, be sure to remember to add; This statement ends the symbol, otherwise you absolutely want to cry, remember!

The actual use of the MySQL command line

One, the database file is too large, with phpMyAdmin Import Database file timeout

Because phpMyAdmin is a web-style database operation software, although it is very convenient to use, but for the Apache this 30-second limit is really helpless, this time the role of command line is reflected, of course, you can also change an operation tool such as navicat to do this operation, But in comparison, I think the command line mode of operation is more simple and convenient, the specific command is the source xxx.sql;

Second, when there is no graphical interface function on your website server, only the command line

Because it is a remote server, and there is no graphical interface, so you can only use this method, of course phpMyAdmin and Navicat have the ability to connect to the remote database, but I still recommend the use of command line mode

How to connect a database remotely with phpMyAdmin

As long as the design to the line, server and other words, you can not avoid to contact the remote connection database This function, as long as there is a user name and password, just use PHP script to write a connet function can be linked to the remote database, easy to use. But if you're using tools such as phpMyAdmin, how do you connect to a remote database?

In wamp\apps\phpmyadmin4.0.4 This directory has a config.inc.php this configuration file

$cfg [' Servers '] [$i] [' host '] = "Your host address"

$cfg [' Servers '] [$i] [' root '] = "your username"

$cfg [' Servers '] [$i] [' password '] = "Your password"

After this is configured, you can directly access your server data by entering localhost/phpmyadmin in the browser.

To summarize: Your database user name and password is really important, be sure to keep it safe

Talk about my management of code, deployment, Release (PHP)---WAMP

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.