安装Mysql初始化数据库失败&使用SQLYog连接

在这里记录一下自己安装Mysql遇到的一些问题

1、mysqld --initialize --console报错,具体报错为The newly created data directory D:\Mysql\data\ by --initialize is unusable. You can remove it.

当时找了许多攻略,包括改斜杠、双斜杠("/", "\\"),注释掉datadir,以管理员身份运行,添加环境变量等等,这些都没有用,以下是我的my.ini配置文件

[mysqld]
# 设置3306端口
port=3306 # 设置mysql的安装目录(存放地址要改成你的下载路径)
basedir="D:\\Mysql\\"
# 设置mysql数据库的数据的存放目录(存放地址要改成你的下载路径)
#datadir = 'D:\\Mysql\\data'
# 允许最大连接数
max_connections=200 # 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统
max_connect_errors=10 # 服务端使用的字符集默认为UTF8
character-set-server=UTF8MB4
# 创建新表时将使用的默认存储引擎 
default-storage-engine=INNODB
# 默认使用“mysql_native_password”插件认证
default_authentication_plugin=mysql_native_password
[mysql]
# 设置mysql客户端默认字符集 
default-character-set=UTF8MB4
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8

我是跟着MySQL安装(详细,适合初学者)-CSDN博客教程安装的,后面又回去看了一下教程,发现自己的安装版本与教程不一样

把安装版本从8.4.0 LTS改成了8.0.37,初始化正常!

(这个bug改了我半天了,真麻了)

2、使用SQLYog连接报错

具体可以看SQLyog连接Mysql时提示 错误代码2003 Can‘t connect to MySQL server on ‘localhost‘(10061)解决方案_sqlyog错误代码2003怎么解决视频-CSDN博客

  • 6
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
As today’s organizations are capturing exponentially larger amounts of data than ever, now is the time for organizations to rethink how they digest that data. Through advanced algorithms and analytics techniques, organizations can harness this data, discover hidden patterns, and use the newly acquired knowledge to achieve competitive advantages. Presenting the contributions of leading experts in their respective fields, Big Data: Algorithms, Analytics, and Applications bridges the gap between the vastness of Big Data and the appropriate computational methods for scientific and social discovery. It covers fundamental issues about Big Data, including efficient algorithmic methods to process data, better analytical strategies to digest data, and representative applications in diverse fields, such as medicine, science, and engineering. The book is organized into five main sections: Big Data Management―considers the research issues related to the management of Big Data, including indexing and scalability aspects Big Data Processing―addresses the problem of processing Big Data across a wide range of resource-intensive computational settings Big Data Stream Techniques and Algorithms―explores research issues regarding the management and mining of Big Data in streaming environments Big Data Privacy―focuses on models, techniques, and algorithms for preserving Big Data privacy Big Data Applications―illustrates practical applications of Big Data across several domains, including finance, multimedia tools, biometrics, and satellite Big Data processing Overall, the book reports on state-of-the-art studies and achievements in algorithms, analytics, and applications of Big Data. It provides readers with the basis for further efforts in this challenging scientific field that will play a leading role in next-generation database, data warehousing, data mining, and cloud computing research. It also explores related applications in diverse sectors, covering technologies for media/data communication, elastic media/data storage, cross-network media/data fusion, and SaaS. Table of Contents Chapter 1: Scalable Indexing for Big Data Processing Chapter 2: Scalability and Cost Evaluation of Incremental Data Processing Using Amazon’s Hadoop Service Chapter 3: Singular Value Decomposition, Clustering, and Indexing for Similarity Search for Large Data Sets in High-Dimensional Spaces Chapter 4: Multiple Sequence Alignment and Clustering with Dot Matrices, Entropy, and Genetic Algorithms Chapter 5: Approaches for High-Performance Big Data Processing : Applications and Challenges Chapter 6: The Art of Scheduling for Big Data Science Chapter 7: Time–Space Scheduling in the MapReduce Framework Chapter 8: GEMS: Graph Database Engine for Multithreaded Systems Chapter 9: KSC-net : Community Detection for Big Data Networks Chapter 10: Making Big Data Transparent to the Software Developers’ Community Chapter 11: Key Technologies for Big Data Stream Computing Chapter 12: Streaming Algorithms for Big Data Processing on Multicore Architecture Chapter 13: Organic Streams : A Unified Framework for Personal Big Data Integration and Organization Towards Social Sharing and Individualized Sustainable Use Chapter 14: Managing Big Trajectory Data : Online Processing of Positional Streams Chapter 15: Personal Data Protection Aspects of Big Data Chapter 16: Privacy-Preserving Big Data Management : The Case of OLAP Chapter 17: Big Data in Finance Chapter 18: Semantic-Based Heterogeneous Multimedia Big Data Retrieval Chapter 19: Topic Modeling for Large-Scale Multimedia Analysis and Retrieval Chapter 20: Big Data Biometrics Processing : A Case Study of an Iris Matching Algorithm on Intel Xeon Phi Chapter 21: Storing, Managing, and Analyzing Big Satellite Data : Experiences and Lessons Learned from a Real-World Application Chapter 22: Barriers to the Adoption of Big Data Applications in the Social Sector
If the designated data directory "/home/test/mysql-8.0/data/" is unusable, you can remove all the files that the server added to it. However, please note that removing these files will delete all the data stored in the MySQL database. Make sure to backup any important data before proceeding with the following steps: 1. Stop the MySQL server: Use the appropriate command to stop the MySQL server. For example, you can use `sudo service mysql stop` or `sudo systemctl stop mysql` depending on your system. 2. Remove the data directory: Execute the following command to remove the data directory and its contents: ``` sudo rm -rf /home/test/mysql-8.0/data/ ``` Please be cautious when using the `rm` command with the `-rf` options, as it will recursively delete all files and directories without confirmation. 3. Recreate the data directory: After removing the data directory, you can recreate it using the following command: ``` sudo mkdir /home/test/mysql-8.0/data/ ``` 4. Set appropriate permissions: Ensure that the newly created data directory has the correct permissions for MySQL to access and modify it. You can set the necessary permissions using the following command: ``` sudo chown -R mysql:mysql /home/test/mysql-8.0/data/ sudo chmod -R 770 /home/test/mysql-8.0/data/ ``` These commands will change the ownership of the directory to the MySQL user and grant appropriate read, write, and execute permissions. 5. Start the MySQL server: Start the MySQL server using the appropriate command. For example, you can use `sudo service mysql start` or `sudo systemctl start mysql`. After completing these steps, the data directory should be recreated and ready for MySQL to use. However, keep in mind that all previous data will be lost.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值