This tutorial is primarily configured with the Windows 2008 SP2 32bit standard to configure PHP 7.0rc2+nginx 1.9.4+mysql 5.6.26, and to turn on HTTPS access.
First, preparatory work
1, Nginx+php+mysql and other downloads and decompression: Baidu
Method one, using Fputcsv
The code is as follows
Copy Code
Output Excel file headers, you can replace user.csv with the file name you wantHeader (' Content-type:application/vnd.ms-excel ');Header ('
Instance One
The code is as follows
Copy Code
PNR code connection in China$hostname = "127.0.0.1"; The IP address of the MSSQL server or the name of the server$dbuser = "sa"; The account number of the MSSQL
Know that the 1 in tinyint (1) is only for the specified display length and does not represent the storage length, but it is useful to specify Zerofill for the field.
For example tinyint (3), if the actual value is 8, if the column specifies
Modify the data content in the MySQL database to delete:
[Root@hk ~]#/usr/local/mysql/bin/mysql-uroot-p ' admin ' #进入mysqlMysql> CREATE DATABASE GBK default Character set GBK collate gbk_chinese_ci; #建立一个名字叫做gbk的数据库Mysql> Use GBKmysql> show
MySQL Utilities provides a range of MySQL server and database management tools. Full support for MySQL5.1 and above versions, also compatible with MySQL5.0 versions, although some features are not supported. MySQL4.0 version is not supported.In the
//php and MySQL database connection code
The code is as follows
Copy Code
mysql_connect (' localhost ', ' root ', ' root ') or Die (' MySQL server stop or use password error! ');mysql_select_db (' cshouse ') or Die ('
For the majority of users using VPS host may be a little bit of a threshold, after all, most of them are used to build station requirements, from the virtual host over to the VPS host, server technology a little bit of a problem. Basically we will
Method One, directly uses phpMyAdmin to modify the user select *.* or enter the IP address in "permission" management.
Method Two, use the MySQL grant command to operate
For example: Allow NewUser users to link to the MySQL server from the ip:192.1
Login directly under the command line MySQL run show STATUS;
1, view MySQL server configuration information
The code is as follows
Copy Code
Mysql> Show variables;
2, view the MySQL server running the
First, in Libmysql, the Mysql_opt_read_timeout settings item is provided, and the Libmysql provides an API for setting related settings items.
The code is as follows
Copy Code
Mysql_options: int stdcall Mysql_options
1, login MySQL Database
Mysql-u root-p
View User table
The code is as follows
Copy Code
mysql> use MySQL;Database changedMysql> select Host,user,password from user;+--------------+------+---------------------------------
MySQL default data file storage directory for/var/lib/mysql
The following steps are required if you want to move the directory to/home/mysqldata:
1, the home directory to establish Mysqldata directory
The code is as follows
Copy
Since MySQL was acquired by Oracle, the community has been worried that MySQL may be shut down or some other reasons may cause MySQL support problems. So now many versions of the default database are transferred from MySQL to Mariadb. In addition,
When there are too many fields in a table in mysql and the data size is too large, we have to consider vertical segmentation of the table to improve performance.The so-called vertical split is actually to split a table with many columns (fields) to
This chapter demonstrates how to use a mysql client program to create and use a simple database and provideGetting started. Mysql is an interactive program that allows you to connectA MySQL server, run the query and view the results. Mysql can be
First, we need to log on to the php Tutorial (as the mainstream development language) MyAdmin without demonstration.2. Create a database tutorial, as shown in the following figure. Fill in the database name in the right window of "MyAdmin" in php
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