


Detailed introduction to the installation and configuration method of mysql 5.7.13 under Mac
This article mainly introduces the graphic tutorial of mysql 5.7.13 Installation configuration method under Mac. The content is very detailed and has certain reference value. Interested friends You can refer to the
mysql 5.7.13 installation tutorial under Mac, which is very detailed and recorded as follows
First download the installation package. If you are not afraid of trouble, you can directly download mysql from Baidu
This kind of installation requires using the command line, which may cause various problems. Alternatively, you can go directly to the official website to download the installation package in DMG format (Ps: It is best to download directly using Thunder to avoid network speed problems. The download is extremely slow and the speed is almost the same as the normal download speed. I only took two minutes)
1. Installation package downloaded from the official website: Just open it all the way and take the next step. After the installation is completed
Remember the password You will need this to change the password
Open the system preferences and you will find that there are more at the bottom A mysql icon
This means that the installation is successful. Click it and click start. Mysql will start. If there is no response, just restart it. No need to bother, you will find that the After half a day, it was finally solved with a restart. After restarting, you will find that your Mysql automatically starts serving.
At this time, if you execute it directly from the command line, you will definitely be prompted. We need to add mysql to the environment
variable: $ mysql
-bash: mysql: command not found
Ps: To enter
in vim, press i and then you Mysql is installed
2. Use the command line downloaded from Baidu to installFirst unzip the package you downloaded and it should look like this
Rename the first one to mysql (just for convenience) and then move it to /usr/local/
Enter the /bin/ folder in the console
执行vim ~/.bash_profile 在该文件中添加mysql/bin的目录,见pic7: PATH=$PATH:/usr/local/mysql/bin 添加完成后,按esc,然后输入wq保存。 最后在命令行输入source ~/.bash_profile 上面的路径是你 /usr/local/下的mysql文件夹可能会和下载的名字一样 自己进去看看
Then wait for a while and the installation will be completed. Finally, you will be given a string of passwords. Remember, to change the password later, you must use the
installation and the previous steps to configure the environment variables
At this time, if you open mysql on the command line, you will find that it will prompt an error. Don't worry about it and it will be a waste of time. Just restart it.
Then your mysql will be usable.
3. Change it Root user passwordThe initial password is smelly and long, so be sure to change it to what you want.
mysqld --initialize --user=‘你的用户名'
Get it done and call it a day. The official provides a graphical management interface. You can go to the official website for workbench yourself. Using Thunder is still very fast.
The above is the detailed content of Detailed introduction to the installation and configuration method of mysql 5.7.13 under Mac. For more information, please follow other related articles on the PHP Chinese website!

MySQLdiffersfromotherSQLdialectsinsyntaxforLIMIT,auto-increment,stringcomparison,subqueries,andperformanceanalysis.1)MySQLusesLIMIT,whileSQLServerusesTOPandOracleusesROWNUM.2)MySQL'sAUTO_INCREMENTcontrastswithPostgreSQL'sSERIALandOracle'ssequenceandt

MySQL partitioning improves performance and simplifies maintenance. 1) Divide large tables into small pieces by specific criteria (such as date ranges), 2) physically divide data into independent files, 3) MySQL can focus on related partitions when querying, 4) Query optimizer can skip unrelated partitions, 5) Choosing the right partition strategy and maintaining it regularly is key.

How to grant and revoke permissions in MySQL? 1. Use the GRANT statement to grant permissions, such as GRANTALLPRIVILEGESONdatabase_name.TO'username'@'host'; 2. Use the REVOKE statement to revoke permissions, such as REVOKEALLPRIVILEGESONdatabase_name.FROM'username'@'host' to ensure timely communication of permission changes.

InnoDB is suitable for applications that require transaction support and high concurrency, while MyISAM is suitable for applications that require more reads and less writes. 1.InnoDB supports transaction and bank-level locks, suitable for e-commerce and banking systems. 2.MyISAM provides fast read and indexing, suitable for blogging and content management systems.

There are four main JOIN types in MySQL: INNERJOIN, LEFTJOIN, RIGHTJOIN and FULLOUTERJOIN. 1.INNERJOIN returns all rows in the two tables that meet the JOIN conditions. 2.LEFTJOIN returns all rows in the left table, even if there are no matching rows in the right table. 3. RIGHTJOIN is contrary to LEFTJOIN and returns all rows in the right table. 4.FULLOUTERJOIN returns all rows in the two tables that meet or do not meet JOIN conditions.

MySQLoffersvariousstorageengines,eachsuitedfordifferentusecases:1)InnoDBisidealforapplicationsneedingACIDcomplianceandhighconcurrency,supportingtransactionsandforeignkeys.2)MyISAMisbestforread-heavyworkloads,lackingtransactionsupport.3)Memoryengineis

Common security vulnerabilities in MySQL include SQL injection, weak passwords, improper permission configuration, and unupdated software. 1. SQL injection can be prevented by using preprocessing statements. 2. Weak passwords can be avoided by forcibly using strong password strategies. 3. Improper permission configuration can be resolved through regular review and adjustment of user permissions. 4. Unupdated software can be patched by regularly checking and updating the MySQL version.

Identifying slow queries in MySQL can be achieved by enabling slow query logs and setting thresholds. 1. Enable slow query logs and set thresholds. 2. View and analyze slow query log files, and use tools such as mysqldumpslow or pt-query-digest for in-depth analysis. 3. Optimizing slow queries can be achieved through index optimization, query rewriting and avoiding the use of SELECT*.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6
Visual web development tools

SublimeText3 Chinese version
Chinese version, very easy to use

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
