Shell Operation MySQL Method

Way One:# mysql-u Root-h 127.0.0.1-p-u username-H HOST_IP-P "New_pass"-D db_name//Specify a database for direct access-E "sql_language"//Direct execution of SQL statements directly in the interactionFor example: mysql-uroot-hlocalhost-pmypass-d

Analysis of the difference between char and varchar in MySQL

Char fixed length, so the processing speed is much faster than varchar, but to the cost of storage space, so the storage is not small, but the speed of the requirements can use the char type, conversely, can be used to instantiate the varchar

Centos6.5 Modify MySQL remote login

after Linux installs MySQL database, connect MySQL times by remote erro 2003:can ' t connect to MySQL server on ' *.***.*** ' (111), the workaround is as follows:1.[[email protected] ~]# mysql-u root p #登陆mysql2.mysql> Grant all privileges on * * to

MySQL CREATE database, build table operation process

First, Create a databaseCreare database superdatabase; Create a database superdatabaseUse Superdatabase; Use the databaseWith the above statement, you do not have to specify the database name used in each SQL statement. By default, MySQL will use

Xtrabackup Backup for MySQL

########################################################################################  ###### When recovering a database, you need to apply the backup log to the backup file so that it can be restored ##### #备份:

Simple nginx,mysql,http Daemon Boot program

#!/bin/bash  #shell自检启动守护程序   #有时候服务进程会挂掉, can run a daemon script, detect running status, start, email checkmysql= ' pgrep mysql '   checknginx= ' Pgrep nginx '  checkhttpd= ' pgrep httpd '   while : do      date=$ (date + "%y-%m-%d %h:%m:%s")      

MYSQL Command Line Connection database

Today, the MySQL database is operated on a single test machine, and is connected via command line mode without the installation of a visualizer.Through the command into the MySQL bin directory to connect after the prompt can not connect, after

SQLyog writing MySQL stored procedures

Damn it, it's weird, write a stored procedure. Damn, that's a simple thing. It's just a few more spaces. That's a real problem. I've been doing this for half a day.DELIMITER//create PROCEDURE pro11 () BEGIN DECLARE i INT DEFAULT 0; REPEAT

MySQL Enterprise backup Getting started with

--1. Fully prepared ****************************************** #mysqlbackup--defaults-file=/usr/local/mysql/my.cnf--host=127.0.0.1--port=3306--protocol= TCP--user=root--password=passwd123! --databases=

Read a random piece of data in MYSQL

SELECT * FROM res as T1 JOIN (select ROUND (RAND () * (= (select MAX (ID) from res)-(select min (id) from res)) + (select min ( ID)) as ID) as T2 WHERE t1.id >= t2.id ORDER by t1.id LIMIT 1;SELECT * from ' res ' as T1 JOIN (select ROUND (RAND () * (=

MySQL inserted Chinese record garbled

1, modify the configuration file My.ini Set encoding method is Utf-8[Client] default-character-set=UTF8 [mysqld]character-set-server=UTF8 collation -server=utf8_general_ci init_connect= ' SET NAMES utf8′Restart MySQL, and then enter it at the

Shell script Connection MySQL database query the number of tables and table names

#!/bin/bashMysqlhost="127.0.0.1"Mysqluser="Root"mysqlpwd="Root"Mysqlport="3306"MySQLdb="Test"Echo"Health Tables Total:">Mysqlcount.txt;mysql-H$MYSQLHOST-U$MYSQLUSER-P$MYSQLPWD-P$MYSQLPORT-D$MYSQLDB-bse"Select COUNT (*) from information_schema.tables

MySQL Database permissions

1.usage PermissionsThis permission can only be logged into the database, cannot perform any operations, and usage permissions cannot be recycled2.select PermissionsThis permission is a field-level permission to query the data in the table3.insert

MySQL function (ii)

1, Space (N) output spaceSELECT SPACE (5);""2, replace (STR,FROM_STR,TO_STR) said Str in from_str replaced by to_strSELECT REPLACE (' http://www.baidu.com.cn ', ' Baidu ', ' Google ');http://www.google.com.cn3, repeat (str,n) repeat output N times

Install_driver (mysql) failed, installfailed

Install_driver (mysql) failed, installfailedAfter the mysql monitoring artifact innotop is installed, innotoop is not available. The error message is install_driver (mysql) failed: can't load

Mysql Transaction Processing

Mysql Transaction Processing Transaction processing is widely used in various management systems. For example, in the personnel management system, many synchronous database operations require transaction processing. For example, in the personnel

MySql Time Processing

MySql Time Processing Many times, we want to process the time when querying the Mysql database, such as formatting or other operations. This avoids further processing, mysql also has many time-related processing functions. Today, we will make a

MySql: Lan and permission user management, mysql permission user management

MySql: Lan and permission user management, mysql permission user managementMySql 5.6 (XP)/5.7 (win7) Add users and set local access permissions operations. Please in http://sourceforge.net/download MySql Control Center (not installed

Linux uninstall mysql-libs package error, linuxmysql-libs

Linux uninstall mysql-libs package error, linuxmysql-libs A conflict with the package mysql-libs-5.1.73-3.el6_5.x86_64 occurs when installing MySQL on Red Hat Enterprise Linux6.6 [root@localhost tmp]# rpm -ivh MySQL-server-advanced-5.6.20-1.rhel5.

Array tree function, Array Function

Array tree function, Array Function Function getTree ($ data, $ pid = 0, $ key = 'id', $ pKey = 'pid ', $ childKey = 'child', $ maxDepth = 0) {static $ depth = 0; $ depth ++; if (intval ($ maxDepth) $ maxDepth) {exit ("error recursion: max

Total Pages: 3233 1 .... 3217 3218 3219 3220 3221 .... 3233 Go to: GO

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.