怎么安装运行mysql 怎么安装运行环境( 二 )


如何下载并安装MySQL?下载并安装MySQL就需要先到应用商店下载MySQL压缩包 , 然后打开压缩包进行运行,最后创建文件夹设置密码即可 。具体操作如下:
工具:电脑一台 。
1、下载MySQL压缩包 。
2、将下载后的压缩包解压到当前目录 。
3、设置环境变量 。
4、安装mysql , 创建data文件夹 。
5、启动MySQL服务 , 登录MySQL 。
注意事项:
在下载MySQL的时候一定要到各个正规平台进行下载 , 避免自己的电脑被木马等等病毒入侵 。
mysql安装教程mysql安装教程具体步骤如下:
工具:联想笔记本电脑 。
1、打开下载的安装文件,出现如下界面 。
2、mysql安装向导启动,点击“next”继续 。
3、选择安装类型 , 有“Typical(默认)”、“Complete(完全)”、“Custom(用户自定义)”三个选项,我们选择“Custom”,有更多的选项 , 也方便熟悉安装过程 。
4、在“MySQLServer(MySQL服务器)”上左键单击,选择“Thisfeature , andallsubfeatures,willbeinstalledonlocalharddrive.” , 即“此部分,及下属子部分内容 。
5、正在安装中,请稍候,直到出现下面的界面 。
6、点击“next”继续,出现如下界面 。
7、现在软件安装完成了 , 出现上面的界面,这里有一个很好的功能 , mysql配置向导,不用向以前一样 。
8、自己手动乱七八糟的配置my.ini了,将“ConfiguretheMysqlServernow”前面的勾打上,点“Finish”结束 。
如何安装MYSQL使用yum安装mysql数据库的软件包 [root@xuegod63 ~]# yum -y install mariadb-server mariadb。
注:mariadb-server#MariaDB数据库 mariadb# MariaDB服务器Linux下客户端。
注:从centos7系统开始,系统中自带的mysql数据库变成了mariadb-server,mariadb-server和mysql操作上一样 。mariadb-server是mysql的一个分支 。
启动数据库服务[root@xuegod63 ~]# systemctl startmariadb#启动MariaDB服务 。[root@xuegod63 ~]# systemctl enablemariadb#设置开启自动启动MariaDB服务 。
安装完mariadb-server后,运行mysql_secure_installation去除安全隐患 , [root@xuegod63 ~]# mysql_secure_installation#进入安全配置导向 。
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current , password for the root user. If you've just installed MySQL, and,you haven't set the root password yet, the password will be blank,,so you should just press enter here.Enter current password for root (enter for none):#初次运行直接回车 , 因为root用户没有密码 。
OK, successfully used password, moving on,Setting the root password ensures that nobody can log into the MySQL,root user without the proper authorisation.,Set root password? [Y/n] Y#是否设置root用户密码,输入Y 。
New password: 123456#新密码123456,Re-enter new password: 123456 , Password updated successfully!Remove anonymous users? [Y/n] Y#是否删除匿名用户,生产环境建议删除,所以直接回车或Y 。
Success!Normally, root should only be allowed to connect from 'localhost'.Thisensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] Y#是否禁止root远程登录,根据自己的需求选择Y/n并回车建议禁止 。
Success!By default, MariaDB comes with a database named 'test' that anyone canaccess.This is also intended only for testing, and should be removedbefore moving into a production environment.Remove test database and access to it? [Y/n] Y#是否删除test数据库,直接回车或Y 。

推荐阅读