2018.8.19 mybatis Environment Build---configuration MySQL

Source: Internet
Author: User

Install MySQL install/remove of the Service denied! error resolution
在windos 的cmd下安装mysql在mysql的bin目录下面执行: mysqld --install报错:    信息如下:Install/Remove of the Service Denied 解决办法:打开cmd.exe程序的时候选择“用管理员身份打开”。
mysql5.6 version of the installation 1 download software
:https://dev.mysql.com/downloads/mysql/5.6.html
2 Extracting files
解压文件到E:\Program Files目录
3 Modifying My-default.ini
进入 mysql-5.6.37-winx64目录下,找到my-default.ini文件,添加如下: basedir = E:\Program Files\mysql-5.6.37-winx64      //路径看个人的情况datadir = E:\Program Files\mysql-5.6.37-winx64\data
4 Copy My.ini file
把my.ini文件拷贝到解压的根目录中   主要是设置编码格式
5 Configuring Environment variables
配置环境变量,在path后增加E:\Program Files\mysql-5.6.37-winx64\bin
6 Adding services
进入以上bin目录,以管理员方式运行cmd命令窗体,执行以下命令: 1, mysqld -install 创建mysql windows服务 2,mysqld  -remove删除mysql windows服务2, net start mysql 启动mysql数据库服务 3, mysql -u root -p 登录mysql, 会显示输入密码,默认密码为空,直接回车
7 Change Password
修改root登录密码, 修改密码有多种方式,这里使用命令修改,如下: 1, 输入exit退出刚登录的数据库 2, 输入mysqladmin -u root -p password 回车后设置新密码与确认密码即可
MySQL garbled processing 1 get MySQL character set
 mysql> show variables like "character_set_%";这6个最好总是保持一致,
2 Setting the Uniform encoding
set character_set_client=utf8;  set character_set_connection=utf8;set character_set_database=utf8;  set character_set_results=utf8;   set character_set_server=utf8;set character_set_system=utf8;
3. Set the JSP encoding to match the MySQL character set
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>  
4 using request to set up encoding in a servlet
request.setCharacterEncoding("UTF-8");注意:这行代码写在dopost方法中的第一行

2018.8.19 mybatis Environment Build---configuration MySQL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.