OS & MySQL的版本和配置:
MySQL Version: 5.6.19 Linux Version: Linux boston.oracle.com 2.6.18-164.el5 #1 SMP Thu Sep 3 02:16:47 EDT 2009 i686 i686 i386 GNU/Linux
一,下载MySQL安装软件,请到www.oracle.com 去找DATABASE DOWNLOAD,下载MySQL需要注册一个账号。我下载的版本如下:
下载后解压就是以下的8个文件 :
二, 在Linux上安装MySQL(一个服务器程序和一个客户端程序)
[root@vmoel5u4 mysql_installer]# ll
total 115896
-rw-r--r-- 1 root root 22925106 May 8 2014 MySQL-client-advanced-5.6.19-1.rhel5.i386.rpm
-rw-r--r-- 1 root root 95621549 May 8 2014 MySQL-server-advanced-5.6.19-1.rhel5.i386.rpm
--安装Server端:
[root@vmoel5u4 mysql_installer]# rpm -ivh MySQL-server-advanced-5.6.19-1.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-server-advanced ########################################### [100%]
2012-11-18 00:34:49 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2012-11-18 00:34:49 16251 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2012-11-18 00:34:49 16251 [Note] InnoDB: The InnoDB memory heap is disabled
2012-11-18 00:34:49 16251 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2012-11-18 00:34:49 16251 [Note] InnoDB: Compressed tables use zlib 1.2.3
2012-11-18 00:34:49 16251 [Note] InnoDB: Using Linux native AIO
2012-11-18 00:34:49 16251 [Note] InnoDB: Not using CPU crc32 instructions
2012-11-18 00:34:49 16251 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2012-11-18 00:34:49 16251 [Note] InnoDB: Completed initialization of buffer pool
2012-11-18 00:34:49 16251 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2012-11-18 00:34:49 16251 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2012-11-18 00:34:49 16251 [Note] InnoDB: Database physically writes the file full: wait...
2012-11-18 00:34:49 16251 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2012-11-18 00:34:50 16251 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2012-11-18 00:34:50 16251 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2012-11-18 00:34:50 16251 [Warning] InnoDB: New log files created, LSN=45781
2012-11-18 00:34:50 16251 [Note] InnoDB: Doublewrite buffer not found: creating new
2012-11-18 00:34:50 16251 [Note] InnoDB: Doublewrite buffer created
2012-11-18 00:34:50 16251 [Note] InnoDB: 128 rollback segment(s) are active.
2012-11-18 00:34:50 16251 [Warning] InnoDB: Creating foreign key constraint system tables.
2012-11-18 00:34:50 16251 [Note] InnoDB: Foreign key constraint system tables created
2012-11-18 00:34:50 16251 [Note] InnoDB: Creating tablespace and datafile system tables.
2012-11-18 00:34:50 16251 [Note] InnoDB: Tablespace and datafile system tables created.
2012-11-18 00:34:50 16251 [Note] InnoDB: Waiting for purge to start
2012-11-18 00:34:50 16251 [Note] InnoDB: 5.6.19 started; log sequence number 0
2012-11-18 00:34:50 16251 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2012-11-18 00:34:50 16251 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
A random root password has been set. You will find it in '/root/.mysql_secret'.
2012-11-18 00:34:51 16251 [Note] Binlog end
2012-11-18 00:34:51 16251 [Note] InnoDB: FTS optimize thread exiting.
2012-11-18 00:34:51 16251 [Note] InnoDB: Starting shutdown...
2012-11-18 00:34:53 16251 [Note] InnoDB: Shutdown completed; log sequence number 1625977
2012-11-18 00:34:53 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2012-11-18 00:34:53 16282 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2012-11-18 00:34:53 16282 [Note] InnoDB: The InnoDB memory heap is disabled
2012-11-18 00:34:53 16282 [Note] InnoDB: Mutexes and rw_locks use InnoDB's own implementation
2012-11-18 00:34:53 16282 [Note] InnoDB: Compressed tables use zlib 1.2.3
2012-11-18 00:34:53 16282 [Note] InnoDB: Using Linux native AIO
2012-11-18 00:34:53 16282 [Note] InnoDB: Not using CPU crc32 instructions
2012-11-18 00:34:53 16282 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2012-11-18 00:34:53 16282 [Note] InnoDB: Completed initialization of buffer pool
2012-11-18 00:34:53 16282 [Note] InnoDB: Highest supported file format is Barracuda.
2012-11-18 00:34:53 16282 [Note] InnoDB: 128 rollback segment(s) are active.
2012-11-18 00:34:53 16282 [Note] InnoDB: Waiting for purge to start
2012-11-18 00:34:53 16282 [Note] InnoDB: 5.6.19 started; log sequence number 1625977
2012-11-18 00:34:53 16282 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2012-11-18 00:34:53 16282 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2012-11-18 00:34:53 16282 [Note] Binlog end
2012-11-18 00:34:53 16282 [Note] InnoDB: FTS optimize thread exiting.
2012-11-18 00:34:53 16282 [Note] InnoDB: Starting shutdown...
2012-11-18 00:34:55 16282 [Note] InnoDB: Shutdown completed; log sequence number 1625987
A RANDOM PASSWORD HAS BEEN SET FOR THE MySQL root USER !
You will find that password in '/root/.mysql_secret'.
You must change that password on your first connect,
no other statement but 'SET PASSWORD' will be accepted.
See the manual for the semantics of the 'password expired' flag.
Also, the account for the anonymous user has been removed.
In addition, you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test database.
This is strongly recommended for production servers.
/* 上面的红色的大概意思如下:
为MySQL的数据库的root的用户生成了一个随机的秘密,请到/root/.mysql_secret里去找密码。
当你第一次登陆时必须修改密码,同时匿名帐号已经被删除掉了。
除此之外,你可以执行:
/usr/bin/mysql_secure_installation
他可以给你一些移除test 数据库的选项。
强烈推荐在生产服务器上做此操作。
*/
See the manual for more instructions.
Please report any problems athttp://bugs.mysql.com/
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses athttp://shop.mysql.com
New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings
--安装Client端:
[root@vmoel5u4 mysql_installer]# rpm -ivh MySQL-client-advanced-5.6.19-1.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-client-advanced ########################################### [100%]
三,MySQL 数据库的配置
1,启动MySQL服务
[root@vmoel5u4 mysql_installer]# cd /etc/rc.d/init.d
[root@vmoel5u4 init.d]# service mysql start
Starting MySQL.......... [ OK ]
2,修改MySQL数据库root用户的初始密码,先查下初始密码
[root@vmoel5u4 mysql_installer]# vi /root/.mysql_secret
# The random password set for the root user at Sun Nov 18 00:34:51 2012 (local time): kX65UtYvovXN9VOV
从上面可以初始密码是:kX65UtYvovXN9VOV
[root@vmoel5u4 init.d]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 15
Server version: 5.6.19-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.
mysql>
/*修改密码为123456*/
mysql> update user set password=PASSWORD('123456') where user='root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0
/*刷新权限表*/
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
3,用新密码123456登陆MySQL
[root@vmoel5u4 init.d]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or /g.
Your MySQL connection id is 16
Server version: 5.6.19-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.
mysql> use mysql ;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select Host,User,Password from user;
+-----------+------+-------------------------------------------+
| Host | User | Password |
+-----------+------+-------------------------------------------+
| localhost | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| 127.0.0.1 | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| ::1 | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+-----------+------+-------------------------------------------+
3 rows in set (0.00 sec)
4, 创建新的表test,并插入测试数据
mysql> create table test(id int);
Query OK, 0 rows affected (0.05 sec)
mysql> insert into test(id) values(1);
Query OK, 1 row affected (0.05 sec)
mysql> insert into test(id) values(2);
Query OK, 1 row affected (0.01 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from test;
+------+
| id |
+------+
| 1 |
| 2 |
+------+
2 rows in set (0.02 sec)

データベースとプログラミングにおけるMySQLの位置は非常に重要です。これは、さまざまなアプリケーションシナリオで広く使用されているオープンソースのリレーショナルデータベース管理システムです。 1)MySQLは、効率的なデータストレージ、組織、および検索機能を提供し、Web、モバイル、およびエンタープライズレベルのシステムをサポートします。 2)クライアントサーバーアーキテクチャを使用し、複数のストレージエンジンとインデックスの最適化をサポートします。 3)基本的な使用には、テーブルの作成とデータの挿入が含まれ、高度な使用法にはマルチテーブル結合と複雑なクエリが含まれます。 4)SQL構文エラーやパフォーマンスの問題などのよくある質問は、説明コマンドとスロークエリログを介してデバッグできます。 5)パフォーマンス最適化方法には、インデックスの合理的な使用、最適化されたクエリ、およびキャッシュの使用が含まれます。ベストプラクティスには、トランザクションと準備された星の使用が含まれます

MySQLは、中小企業に適しています。 1)中小企業は、顧客情報の保存など、基本的なデータ管理にMySQLを使用できます。 2)大企業はMySQLを使用して、大規模なデータと複雑なビジネスロジックを処理して、クエリのパフォーマンスとトランザクション処理を最適化できます。

INNODBは、次のキーロックメカニズムを通じてファントムの読み取りを効果的に防止します。 1)Next-KeyLockingは、Row LockとGap Lockを組み合わせてレコードとギャップをロックして、新しいレコードが挿入されないようにします。 2)実際のアプリケーションでは、クエリを最適化して分離レベルを調整することにより、ロック競争を削減し、並行性パフォーマンスを改善できます。

MySQLはプログラミング言語ではありませんが、そのクエリ言語SQLにはプログラミング言語の特性があります。1。SQLは条件付き判断、ループ、可変操作をサポートします。 2。ストアドプロシージャ、トリガー、機能を通じて、ユーザーはデータベースで複雑な論理操作を実行できます。

MySQLはオープンソースのリレーショナルデータベース管理システムであり、主にデータを迅速かつ確実に保存および取得するために使用されます。その実用的な原則には、クライアントリクエスト、クエリ解像度、クエリの実行、返品結果が含まれます。使用法の例には、テーブルの作成、データの挿入とクエリ、および参加操作などの高度な機能が含まれます。一般的なエラーには、SQL構文、データ型、およびアクセス許可、および最適化の提案には、インデックスの使用、最適化されたクエリ、およびテーブルの分割が含まれます。

MySQLは、データストレージ、管理、クエリ、セキュリティに適したオープンソースのリレーショナルデータベース管理システムです。 1.さまざまなオペレーティングシステムをサポートし、Webアプリケーションやその他のフィールドで広く使用されています。 2。クライアントサーバーアーキテクチャとさまざまなストレージエンジンを通じて、MySQLはデータを効率的に処理します。 3.基本的な使用には、データベースとテーブルの作成、挿入、クエリ、データの更新が含まれます。 4.高度な使用には、複雑なクエリとストアドプロシージャが含まれます。 5.一般的なエラーは、説明ステートメントを介してデバッグできます。 6.パフォーマンスの最適化には、インデックスの合理的な使用と最適化されたクエリステートメントが含まれます。

MySQLは、そのパフォーマンス、信頼性、使いやすさ、コミュニティサポートに選択されています。 1.MYSQLは、複数のデータ型と高度なクエリ操作をサポートし、効率的なデータストレージおよび検索機能を提供します。 2.クライアントサーバーアーキテクチャと複数のストレージエンジンを採用して、トランザクションとクエリの最適化をサポートします。 3.使いやすく、さまざまなオペレーティングシステムとプログラミング言語をサポートしています。 4.強力なコミュニティサポートを提供し、豊富なリソースとソリューションを提供します。

INNODBのロックメカニズムには、共有ロック、排他的ロック、意図ロック、レコードロック、ギャップロック、次のキーロックが含まれます。 1.共有ロックにより、トランザクションは他のトランザクションが読み取らないようにデータを読み取ることができます。 2.排他的ロックは、他のトランザクションがデータの読み取りと変更を防ぎます。 3.意図ロックは、ロック効率を最適化します。 4。ロックロックインデックスのレコードを記録します。 5。ギャップロックロックインデックス記録ギャップ。 6.次のキーロックは、データの一貫性を確保するためのレコードロックとギャップロックの組み合わせです。


ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

MinGW - Minimalist GNU for Windows
このプロジェクトは osdn.net/projects/mingw に移行中です。引き続きそこでフォローしていただけます。 MinGW: GNU Compiler Collection (GCC) のネイティブ Windows ポートであり、ネイティブ Windows アプリケーションを構築するための自由に配布可能なインポート ライブラリとヘッダー ファイルであり、C99 機能をサポートする MSVC ランタイムの拡張機能が含まれています。すべての MinGW ソフトウェアは 64 ビット Windows プラットフォームで実行できます。

WebStorm Mac版
便利なJavaScript開発ツール

SecLists
SecLists は、セキュリティ テスターの究極の相棒です。これは、セキュリティ評価中に頻繁に使用されるさまざまな種類のリストを 1 か所にまとめたものです。 SecLists は、セキュリティ テスターが必要とする可能性のあるすべてのリストを便利に提供することで、セキュリティ テストをより効率的かつ生産的にするのに役立ちます。リストの種類には、ユーザー名、パスワード、URL、ファジング ペイロード、機密データ パターン、Web シェルなどが含まれます。テスターはこのリポジトリを新しいテスト マシンにプルするだけで、必要なあらゆる種類のリストにアクセスできるようになります。

Dreamweaver Mac版
ビジュアル Web 開発ツール

Safe Exam Browser
Safe Exam Browser は、オンライン試験を安全に受験するための安全なブラウザ環境です。このソフトウェアは、あらゆるコンピュータを安全なワークステーションに変えます。あらゆるユーティリティへのアクセスを制御し、学生が無許可のリソースを使用するのを防ぎます。
