Home Database Mysql Tutorial centos6.5下安装mysql,远程访问_MySQL

centos6.5下安装mysql,远程访问_MySQL

Jun 01, 2016 pm 12:58 PM
centos6

 

安装成功后,得做相应配置才能从别的机器访问mysql:

1.开放mysql访问端口3306

修改防火墙配置文件
vi /etc/sysconfig/iptables

加入端口配置
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 6379 -j ACCEPT

重新加载规则

service iptables restart

2.修改mysql库里的host

登录mysql:

use mysql

update user set host='%' where user='root' and host='localhost';

记得一定还得修改密码,因为这时密码已失效,虽然本地还可以原密码登录,可远程改了host后还是没法访问

UPDATE user SET password=password("root") WHERE user='root';

flush privileges;

3.重启mysql,远程就可以访问了

ps:如果由于操作错误,本地得登录不了,可以通过

mysqld_safe --skip-grant-tables &

方式启动mysql,这里不用密码就可以登录mysql,改完后再通过正常方式启动

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How can I remotely connect to Device Manager and troubleshoot connection issues? How can I remotely connect to Device Manager and troubleshoot connection issues? Apr 27, 2023 pm 03:10 PM

Device Manager can be defined as an extension of the management console provided by Microsoft. It provides users with a centralized and organized view of the hardware devices connected to the computer. Accessing Device Manager is easy, but how do you connect to a remote Device Manager? What is a remote device? Before connecting to Device Manager remotely, do you know what a remote device is? A remote device can be defined as any device that you do not have physical access to but can be accessed remotely via a network link or using remote control software. What are some examples of remote access? You can access many devices remotely. Let's assume you work in an open plan office. The office has a printer shared by all employees. From your desk, you can access your printer remotely. Other remote access examples include remote access computing

How to implement Modbus TCP remote access through PHP How to implement Modbus TCP remote access through PHP Jul 17, 2023 pm 07:49 PM

How to implement Modbus TCP remote access through PHP Modbus is a communication protocol used to exchange data between controllers and devices in the field of industrial automation. ModbusTCP is a Modbus protocol based on TCP/IP communication on Ethernet. Using PHP language, we can easily implement remote access to ModbusTCP. This article will introduce how to implement ModbusTCP remote access through PHP and provide sample code. Step 1: Installation

How to disable Remote Desktop on Windows 11 How to disable Remote Desktop on Windows 11 Apr 14, 2023 pm 03:16 PM

How to Disable Remote Desktop on Windows 11 With Remote Desktop, anyone with the correct username and password can access your PC. This is not a common attack tactic, but it can happen. Once a user has access to your PC, bad actors can gain access to your files, applications, and other account credentials. RDP is generally a security feature, but if you don't use it, disabling it can help eliminate attacks from potentially malicious remote threats. So, there are several ways to disable RDP and we'll show you how. want

Quickly implement Ubuntu remote access and control: VNC installation and configuration guide Quickly implement Ubuntu remote access and control: VNC installation and configuration guide Dec 29, 2023 am 11:27 AM

Ubuntu VNC installation and configuration tutorial: Let you quickly achieve remote access and control Overview: VNC (Virtual Network Computing) is a remote control technology that allows users to remotely control another computer through the network. On Ubuntu systems, we can use VNC to achieve remote access and control. This article will provide detailed installation and configuration steps, with specific code examples, to help you quickly achieve remote access and control. Prerequisites: Start the installation and configuration

How to allow remote access to disks on Mac system - Methods for allowing remote access to disks on Mac system How to allow remote access to disks on Mac system - Methods for allowing remote access to disks on Mac system Mar 19, 2024 am 10:37 AM

Friends, do you know how the Mac system allows remote access to the disk? Today I will explain how the Mac system allows remote access to the disk. If you are interested, come and take a look with the editor. I hope it can help you. Step 1: In System Preferences, click Share. Step 2: On the sharing page, check the remote login option. Step 3: On the remote login settings page, check the Allow remote users to have full access to the disk option.

Do GIGABYTE motherboards support CentOS 6 installation? Do GIGABYTE motherboards support CentOS 6 installation? Dec 28, 2023 pm 11:14 PM

Can the kernel of Gigabyte motherboard be installed with Centos6.5? Generally, Gigabyte motherboard is compatible with Centos6.5 operating system. The main problem is the driver. As long as your motherboard, graphics card, sound card and other hardware devices are not up to date and have been used for about a year, there may be some driver compatibility issues. These problems can cause your computer to run slowly, crash, or cause other errors. To solve this problem, we can improve the performance and stability of the device by updating the driver. You can download the latest driver through Device Manager or the official website, and then install it according to the installation guide. This can solve most computer problems caused by driver problems. In addition, regularly clean up junk files on your computer and perform disk defragmentation.

What are the similarities and differences between CentOS7 and CentOS6? What are the similarities and differences between CentOS7 and CentOS6? Jan 01, 2024 pm 10:05 PM

Differences between CentOS7 vs CentOS6 (1) Desktop system [CentOS6] GNOME2.x [CentOS7] GNOME3.x (GNOMEShell) (2) File system [CentOS6] ext4 [CentOS7] xfs (3) Kernel version [CentOS6] 2.6.x-x [CentOS7] 3.10.x-x(4)Boot loader[CentOS6]GRUBLegacy(+efibootmgr)[CentOS7]GRUB2(5)Firewall[CentOS6]iptables[CentOS7]firewalld(6)Default database[Ce

PHP and SOAP: How to achieve remote access and interaction of data PHP and SOAP: How to achieve remote access and interaction of data Jul 28, 2023 pm 06:21 PM

PHP and SOAP: How to achieve remote access and interaction of data Introduction: In web application development, remote access and data interaction are very important functions. SOAP (SimpleObjectAccessProtocol) is a protocol for interaction over the network, which allows client applications to obtain or update data by calling Web service methods. This article will introduce how to use PHP and SOAP to achieve remote access and interaction of data. Part One: Configuring the SOAP Environment

See all articles