8、MariaDB11数据库安装初始化密码Navicat连接

news/2023/6/7 1:23:59

MariaDB11安装

安装前准备

下载安装包

点我去MariaDB官网下载安装包

 查看相关文档

Mariadb Server官方文档

使用zip安装

解压缩zip

将下载到的zip解压缩到想安装的位置。

 

 生成data目录

打开cmd并进入到刚才解压后的bin目录,
执行mysql_install_db.exe程序生产data目录。

 测试启动数据库

在bin目录下执行mysqld --console命令启动数据库(--console是将详细信息输出到屏幕上,可以不加此参数)。
如果出现类似Version: '11.0.0-MariaDB' socket: '' port: 3306 mariadb.org binary distribution的字样则是启动成功。

 可继续在bin目录下执行mysql -uroot进入数据库执行sql测试(刚才的启动窗口不能关闭)。

 到此结束mysql/mariadb已经安装完成。

其他配置

将mysql注册为服务

可进入mysql安装目录的bin目录在管理员cmd环境下执行mysqld --install MariaDB将mysql注册为"MariaDB"的服务,
这里的“MariaDB”改成你想注册的名字,如果忽略不写则默认为“MYSQL”。

注册之后就可以使用“net start MariaDB”来启动,“net stop MariaDB”来停止服务即数据库。

 如果想删除这个服务,可以执行sc delete MariaDB来删除这个服务。

配置PATH

为了更方便的启动数据库,可以将bin目录配置进PATH。

提醒以下, %SystemRoot%别设置到后面去,不然不知道啥时候。就变成window7的行模式,不是表格模式

移动数据库

如果需要移动数据库,需要更改data目录中的my.ini配置文件,
里面写有数据库的地址需要相应更改。

 设置初始化密码

MariaDB设置初始化密码及修改密码

方法一

[root@localhost ~]# mysql -uroot
MariaDB [(none)]> use mysql;
MariaDB [mysql]> UPDATE mysql.user SET password = PASSWORD('newpassword') WHERE user = 'root';
MariaDB [mysql]> FLUSH PRIVILEGES;

刷新MySQL的系统权限相关表

方法二

仅限初始化使用,若有其他,否则会把所有用户密码一并修改

[root@localhost ~]# mysql -uroot
MariaDB [(none)]> use mysql;
MariaDB [mysql]> SET password=PASSWORD('newpassword');
MariaDB [mysql]> FLUSH PRIVILEGES;

方法三

[root@localhost ~]# mysqladmin -u root password 'newpassword'
#如果root已经设置过密码,采用如下方法 
[root@localhost ~]# mysqladmin -u root -p 'oldpassword' password 'newpassword'

配置环境变量后
打开cmd命令。输入mysqld即可

 随机ok即可登录

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.exyb.cn/news/show-4567768.html

如若内容造成侵权/违法违规/事实不符,请联系郑州代理记账网进行投诉反馈,一经查实,立即删除!

相关文章

SQL Server:sp_send_dbmail参数设置(转载)

sp_send_dbmail [ [ profile_name ] profile_name ] [ , [ recipients ] recipients [ ; n ] ] [ , [ copy_recipients ] copy_recipient [ ; n ] ] [ , [ blind_copy_recipients ] blind_copy_recipient [ ; n ] ] [ , [ subject ] subject ] [ ,

数据库邮件服务器中sp_send_dbmail的参数使用

sp_send_dbmail [ [ profile_name ] profile_name ] [ , [ recipients ] recipients [ ; n ] ] [ , [ copy_recipients ] copy_recipient [ ; n ] ] [ , [ blind_copy_recipients ] blind_copy_recipient [ ; n ] ] [ , [ subject ] subject ] [ , [ bod

【GTS】com.google.android.stagedinstall.gts.host.StagedInstallTest#testSamegradeSystemTzdataApe Fail问题

1.首先找到host_log_xxx.txt文件查看测试fail项堆栈,如下: 12-08 13:25:51 I/ModuleListener: [1/1] com.android.compatibility.common.tradefed.testtype.JarHostTest com.google.android.stagedinstall.gts.host.StagedInstallTest#testSamegradeSys…

SQLSERVER 数据库邮件发送以表格形式发送(存储过程内容发邮件)

SQLSERVER 数据库邮件发送以表格形式发送 直接开始不哔哔! 一、数据库配置(以图文展现) 1.以sa或者windows身份登录数据库 2.选择数据库管理下面的数据库邮件: 3.选择数据库邮件左击选择配置数据库邮件。 直接下一步 这里我们…

如何在SQL Server中配置数据库邮件

Database Mail, as you would expect from its name, is a solution for sending e-mail messages from the SQL Server Database Engine to users. Using Database Mail, database applications can send e-mail messages that can, for example, contain query results or s

Laravel Argument 1 passed to App\Models\Recipients\AlertRecipient::__construct() must be an instance

今天测试snipet的计划任务,库存低于警告值的时候,时候会会自动发送邮件到邮箱 class SendInventoryAlerts extends Command {/*** The name and signature of the console command.** var string*/protected $signature snipeit:inventory-alerts;可以看…

Mail Component(Headers take precedence over pre-configured recipients)

http://camel.apache.org/mail.html Mail Component The mail component provides access to Email via Springs Mail support and the underlying JavaMail system. Maven users will need to add the following dependency to their pom.xml for this component: <depe

发送邮件报错:452 Too many recipients

发送邮件时提示&#xff1a;发送邮件时发生错误&#xff01;452 Too many recipients 原因&#xff1a;根据国际标准允许100个收件人&#xff0c;如果一封邮件发送给多个收件人时&#xff0c;只允许100个&#xff0c;收件人超过100就会报这个错。 解决方法&#xff1a;设置---默…