使用的是linode的centos7系统,安装mysql发现已经默认的是mariadb。 但是不管是使用linode官网说明还是百度搜索到的的根本安装方法无法安装成功。 总是提示这一句: ERROR 2002 (HY000): Cant connect to local MySQL server through socket /var/lib/mysql/
使用的是linode的centos7系统,安装mysql发现已经默认的是mariadb。
但是不管是使用linode官网说明还是百度搜索到的的根本安装方法无法安装成功。
总是提示这一句:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
最后通过google 搜索 install mariadb on centos 7得到了安装的关键一步。
现在安装成功,特此备注一下整个安装过程:
mysql:[root@localhost ~]# yum -y install mariadb* Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.linode.com * extras: mirrors.linode.com * updates: mirrors.linode.com Resolving Dependencies --> Running transaction check ---> Package mariadb.x86_64 1:5.5.37-1.el7_0 will be installed ---> Package mariadb-bench.x86_64 1:5.5.37-1.el7_0 will be installed ---> Package mariadb-devel.x86_64 1:5.5.37-1.el7_0 will be installed ---> Package mariadb-embedded.x86_64 1:5.5.37-1.el7_0 will be installed ---> Package mariadb-embedded-devel.x86_64 1:5.5.37-1.el7_0 will be installed ---> Package mariadb-libs.x86_64 1:5.5.37-1.el7_0 will be installed ---> Package mariadb-server.x86_64 1:5.5.37-1.el7_0 will be installed --> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.37-1.el7_0.x86_64 ---> Package mariadb-test.x86_64 1:5.5.37-1.el7_0 will be installed --> Running transaction check ---> Package perl-DBD-MySQL.x86_64 0:4.023-5.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================== Package Arch Version Repository Size ========================================================================================================== Installing: mariadb x86_64 1:5.5.37-1.el7_0 updates 8.9 M mariadb-bench x86_64 1:5.5.37-1.el7_0 updates 385 k mariadb-devel x86_64 1:5.5.37-1.el7_0 updates 744 k mariadb-embedded x86_64 1:5.5.37-1.el7_0 updates 3.6 M mariadb-embedded-devel x86_64 1:5.5.37-1.el7_0 updates 7.4 M mariadb-libs x86_64 1:5.5.37-1.el7_0 updates 752 k mariadb-server x86_64 1:5.5.37-1.el7_0 updates 11 M mariadb-test x86_64 1:5.5.37-1.el7_0 updates 7.9 M Installing for dependencies: perl-DBD-MySQL x86_64 4.023-5.el7 base 140 k Transaction Summary ========================================================================================================== Install 8 Packages (+1 Dependent package) Total download size: 40 M Installed size: 279 M Downloading packages: (1/9): mariadb-bench-5.5.37-1.el7_0.x86_64.rpm | 385 kB 00:00:00 (2/9): mariadb-devel-5.5.37-1.el7_0.x86_64.rpm | 744 kB 00:00:00 (3/9): mariadb-embedded-5.5.37-1.el7_0.x86_64.rpm | 3.6 MB 00:00:00 (4/9): mariadb-5.5.37-1.el7_0.x86_64.rpm | 8.9 MB 00:00:00 (5/9): mariadb-libs-5.5.37-1.el7_0.x86_64.rpm | 752 kB 00:00:00 (6/9): mariadb-server-5.5.37-1.el7_0.x86_64.rpm | 11 MB 00:00:00 (7/9): mariadb-embedded-devel-5.5.37-1.el7_0.x86_64.rpm | 7.4 MB 00:00:00 (8/9): mariadb-test-5.5.37-1.el7_0.x86_64.rpm | 7.9 MB 00:00:00 (9/9): perl-DBD-MySQL-4.023-5.el7.x86_64.rpm | 140 kB 00:00:00 ---------------------------------------------------------------------------------------------------------- Total 36 MB/s | 40 MB 00:00:01 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : 1:mariadb-libs-5.5.37-1.el7_0.x86_64 1/9 Installing : 1:mariadb-5.5.37-1.el7_0.x86_64 2/9 Installing : perl-DBD-MySQL-4.023-5.el7.x86_64 3/9 Installing : 1:mariadb-server-5.5.37-1.el7_0.x86_64 4/9 Installing : 1:mariadb-devel-5.5.37-1.el7_0.x86_64 5/9 Installing : 1:mariadb-embedded-5.5.37-1.el7_0.x86_64 6/9 Installing : 1:mariadb-embedded-devel-5.5.37-1.el7_0.x86_64 7/9 Installing : 1:mariadb-test-5.5.37-1.el7_0.x86_64 8/9 Installing : 1:mariadb-bench-5.5.37-1.el7_0.x86_64 9/9 Verifying : 1:mariadb-test-5.5.37-1.el7_0.x86_64 1/9 Verifying : 1:mariadb-embedded-devel-5.5.37-1.el7_0.x86_64 2/9 Verifying : 1:mariadb-embedded-5.5.37-1.el7_0.x86_64 3/9 Verifying : 1:mariadb-libs-5.5.37-1.el7_0.x86_64 4/9 Verifying : 1:mariadb-bench-5.5.37-1.el7_0.x86_64 5/9 Verifying : 1:mariadb-5.5.37-1.el7_0.x86_64 6/9 Verifying : 1:mariadb-server-5.5.37-1.el7_0.x86_64 7/9 Verifying : perl-DBD-MySQL-4.023-5.el7.x86_64 8/9 Verifying : 1:mariadb-devel-5.5.37-1.el7_0.x86_64 9/9 Installed: mariadb.x86_64 1:5.5.37-1.el7_0 mariadb-bench.x86_64 1:5.5.37-1.el7_0 mariadb-devel.x86_64 1:5.5.37-1.el7_0 mariadb-embedded.x86_64 1:5.5.37-1.el7_0 mariadb-embedded-devel.x86_64 1:5.5.37-1.el7_0 mariadb-libs.x86_64 1:5.5.37-1.el7_0 mariadb-server.x86_64 1:5.5.37-1.el7_0 mariadb-test.x86_64 1:5.5.37-1.el7_0 Dependency Installed: perl-DBD-MySQL.x86_64 0:4.023-5.el7 Complete! [root@localhost ~]# systemctl start mariadb.service [root@localhost ~]# systemctl enable mariadb.service ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.servi ce' [root@localhost ~]# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 2 Server version: 5.5.37-MariaDB MariaDB Server Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> logout -> exit -> -> ; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaD B server version for the right syntax to use near 'logout exit' at line 1 MariaDB [(none)]> exit Bye [root@localhost ~]# systemctl enable mariadb.service [root@localhost ~]# mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3 Server version: 5.5.37-MariaDB MariaDB Server Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ 4 rows in set (0.00 sec) MariaDB [(none)]> use test Database changed MariaDB [test]> show tables; Empty set (0.00 sec) MariaDB [test]> exit Bye [root@localhost ~]# mysql_secure_installation /usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB installation should now be secure. Thanks for using MariaDB! [root@localhost ~]# mysql -uroot -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 15 Server version: 5.5.37-MariaDB MariaDB Server Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | zbphp.com | +--------------------+ 4 rows in set (0.00 sec) MariaDB [(none)]>文章 by default7#zbphp.com

WebアプリケーションにおけるMySQLの主な役割は、データを保存および管理することです。 1.MYSQLは、ユーザー情報、製品カタログ、トランザクションレコード、その他のデータを効率的に処理します。 2。SQLクエリを介して、開発者はデータベースから情報を抽出して動的なコンテンツを生成できます。 3.MYSQLは、クライアントサーバーモデルに基づいて機能し、許容可能なクエリ速度を確保します。

MySQLデータベースを構築する手順には次のものがあります。1。データベースとテーブルの作成、2。データの挿入、および3。クエリを実行します。まず、createdAtabaseおよびcreateTableステートメントを使用してデータベースとテーブルを作成し、InsertINTOステートメントを使用してデータを挿入し、最後にSelectステートメントを使用してデータを照会します。

MySQLは、使いやすく強力であるため、初心者に適しています。 1.MYSQLはリレーショナルデータベースであり、CRUD操作にSQLを使用します。 2。インストールは簡単で、ルートユーザーのパスワードを構成する必要があります。 3.挿入、更新、削除、および選択してデータ操作を実行します。 4. Orderby、Where and Joinは複雑なクエリに使用できます。 5.デバッグでは、構文をチェックし、説明を使用してクエリを分析する必要があります。 6.最適化の提案には、インデックスの使用、適切なデータ型の選択、優れたプログラミング習慣が含まれます。

MySQLは初心者に適しています。1)インストールと構成、2)リッチラーニングリソース、3)直感的なSQL構文、4)強力なツールサポート。それにもかかわらず、初心者はデータベースの設計、クエリの最適化、セキュリティ管理、データのバックアップなどの課題を克服する必要があります。

はい、sqlisaprogramginglanguagespecializedfordatamanamanagement.1)それはdeclarative、focusingonwhattoachieveratherthanhow.2)

酸性属性には、原子性、一貫性、分離、耐久性が含まれ、データベース設計の基礎です。 1.原子性は、トランザクションが完全に成功するか、完全に失敗することを保証します。 2.一貫性により、データベースがトランザクションの前後に一貫性を保証します。 3.分離により、トランザクションが互いに干渉しないようにします。 4.永続性により、トランザクションの提出後にデータが永久に保存されることが保証されます。

MySQLは、データベース管理システム(DBMS)であるだけでなく、プログラミング言語にも密接に関連しています。 1)DBMSとして、MySQLはデータを保存、整理、取得するために使用され、インデックスを最適化するとクエリのパフォーマンスが向上する可能性があります。 2)SQLとPythonに埋め込まれたプログラミング言語とSQLalchemyなどのORMツールを使用すると、操作を簡素化できます。 3)パフォーマンスの最適化には、インデックス、クエリ、キャッシュ、ライブラリ、テーブル分割、およびトランザクション管理が含まれます。

MySQLはSQLコマンドを使用してデータを管理します。 1.基本コマンドには、select、挿入、更新、削除が含まれます。 2。高度な使用には、参加、サブクエリ、および集計関数が含まれます。 3.一般的なエラーには、構文、ロジック、パフォーマンスの問題が含まれます。 4。最適化のヒントには、インデックスの使用、Select*の回避、制限の使用が含まれます。


ホットAIツール

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

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

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

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

人気の記事

ホットツール

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

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

mPDF
mPDF は、UTF-8 でエンコードされた HTML から PDF ファイルを生成できる PHP ライブラリです。オリジナルの作者である Ian Back は、Web サイトから「オンザフライ」で PDF ファイルを出力し、さまざまな言語を処理するために mPDF を作成しました。 HTML2FPDF などのオリジナルのスクリプトよりも遅く、Unicode フォントを使用すると生成されるファイルが大きくなりますが、CSS スタイルなどをサポートし、多くの機能強化が施されています。 RTL (アラビア語とヘブライ語) や CJK (中国語、日本語、韓国語) を含むほぼすべての言語をサポートします。ネストされたブロックレベル要素 (P、DIV など) をサポートします。

VSCode Windows 64 ビットのダウンロード
Microsoft によって発売された無料で強力な IDE エディター

DVWA
Damn Vulnerable Web App (DVWA) は、非常に脆弱な PHP/MySQL Web アプリケーションです。その主な目的は、セキュリティ専門家が法的環境でスキルとツールをテストするのに役立ち、Web 開発者が Web アプリケーションを保護するプロセスをより深く理解できるようにし、教師/生徒が教室環境で Web アプリケーションを教え/学習できるようにすることです。安全。 DVWA の目標は、シンプルでわかりやすいインターフェイスを通じて、さまざまな難易度で最も一般的な Web 脆弱性のいくつかを実践することです。このソフトウェアは、
