Recently using Navicat for MySQL to access the remote MySQL database, an error occurred, showing "2003-can ' t connect MySQL Server on ' localhost ' (10038)". So desperately Baidu, finally found a solution.Method/Step
1Reading the wrong window
Database initializationLink Databasemy_con = mysql_init(NULL);mysql_real_connect(my_con,MYSQL_SERVER,MYSQL_USER,MYSQL_PASSWD,NULL,0,NULL,0));Create a database file Smart_homemysql_query(my_con, "create database if not exists smart_home"));Choose a
The operation of the record, mainly to increase, delete, change, checkFirst, record insertionCommand:insert into table name (column name, column name, ...) values (value, value, ....);The number of values should be the same as the number of columns,
What is a transaction?a large processing unit that contains multiple operations, involves multiple CPU and IO operations, these operations complete at the same time or not at the same time, that is, the operation of this large processing unit is a
A query for numeric data:SELECT * from Tb_name WHERE sum > 100;Query predicate:>,=,,!=,!>,!,=Two query stringsSELECT * from tb_stu WHERE sname = ' Xiao Liu 'SELECT * from Tb_stu WHERE sname like ' Liu 'SELECT * from Tb_stu WHERE sname like '%
MySQL two trick to handle strings: Substring_index,concatI've been dealing with strings in the database lately, and we've found that they're used to go with these two functions: 1, Substring_index (Str,delim,count) STR: The string to be processed
1. Introduction to the Database 1.1What is a database, a file system that operates on a database using standard SQL 1.2a common databaseOracle is a database of Oracle companies, a large database for a feeDB2, IBM's database, is a large database of
MySQL time function, put the view1. The first day of the week, starting from Sunday mysql> select DayOfWeek (' 2015-05-25 '); +-------------------------+| DayOfWeek (' 2015-05-25 ') |+-------------------------+| 2 |+------------
A note book that lets you review your sentences quickly.CREATE TABLE Users (Username varchar (primary key),Userpwd varchar (20))ALTER TABLE users add age intInsert into Stu (sname) VALUES (' Sdfdsfdsfeeeeee ')Update CJ set cj=60 where sid=1Delete
1. Remember to build a Web site, database, development environment, Web services a brain all on a machine, with a few m of large pictures do webpage background, feel very cool. There is no database optimization problem without access.2. In MySQL,
1 Error message "Error 1036 (HY000): Table is read only", readable and not writable.Workaround: 1 Check if the copied data file belongs to the user and the user group is MYSQL:MYSQL2 check if the new table data file is missing W (write) permission 3
Use this command: ssh-v [email protected], you can view the log of the connection login processSSH to other Linux machines, will wait 10-30 seconds to prompt for a password. Serious impact on productivity. Login is slow, log on up after normal speed,
Export the SQL script for a database in a MySQL database-that is, the structure and data of the database are imported into an SQL script, which can then be recovered by the SQL script.Mysqldump-u MySQL (user name: mysql)-pmysql (password: mysql)
--Query statementsSelect class from Stu_info where sid=1000000102;SELECT * from Stu_info t where t.age=88; --T is the alias of the table, more convenient when querying multiple tablesSELECT * from Atable A, btable b where a.aid = B.bid;SELECT * from
Recently encountered a demand for bulk SMS, SMS interface is provided by a third party. Just started to think, get to the mobile phone number, the loop call interface send it is OK? But soon the problem was found: when the number of messages is
When using Tomcat to deploy servlet connections, there are always a variety of reasons for the Chinese garbled problem. There are some problems with the default character set for MySQL, there are some problems with the client's character
From:http://www.jbxue.com/db/758.htmlImplementing MySQL Monthly Statistics tutorialMySQL has a field is a DateTime type, to implement can be counted by month , how to write SQL statement?Select Month (F1) from the TT Group by month (F1)OrSelect Date_
A.
First stop the service/etc/init.d/mysqld stop and add it in/ETC/MY.CNF:Socket=/var/lib/mysql/mysql.sockSkip-grant-tablesUser=mysql
Start MySQL service, enter MySQL login
mysql> use MySQL;Reading table information for completion
It is often necessary to return a result set in a stored procedure. Mysql in direct use Select you can return the result set. and Oracle you need to use cursors to return the nodeFruitset. This point Mysql relatively convenient, the following code
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