Install MySQL 5.1.34 under Debian

Source: Internet
Author: User
Tags chmod mysql code administrator password

#cd/USR/LOCAL/SRC

# tar Xvzf mysql-5.1.34.tar.gz


# CD mysql-5.5.1.34

Configuration and compilation

#chmod +x Configure

#./configure--prefix=/usr/local/mysql--enable-local-infile

#make

Make will prompt for ABI-related errors, and at the end of the makefile file, remove the ABI-related sections

#make Install

Install the options file and use the current file as a template

#cp support-files/my-medium.cnf/etc/my.cnf


Set MySQL Permissions

#cd/usr/local/mysql

#chown-R MySQL.

#chgrp-R MySQL.


New MySQL-Allowed tables

#/usr/local/mysql/bin/mysql_install_db--user=mysql


#chown-R mysql Var


Set up MySQL boot from:


# Cp/usr/local/src/mysql-5.1.34/support-files/mysql.server/etc/rc.d/init.d/mysql

#chmod +x/etc/rc.d/init.d/mysql

#chkconfig--add MySQL


Test and run MySQL

#/usr/local/mysql/bin/mysqld_safe--user=mysql &

#service MySQL Start


Modify the MySQL administrator password
#/usr/local/mysql/bin/mysqladmin-u Root password Password


Log in with user MySQL
#/usr/local/mysql/bin/mysql-u Root-p


Link MySQL Code

# cd/usr/local/mysql/bin/
#for file in *;
> Do
> ln-s/usr/local/mysql/bin/$file/usr/bin/$file;
> Done

Test MySQL at any location to start MySQL:

#cd

# mysql-u Root-p

Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 7
Server Version:5.1.34-log Source Distribution

Copyright (c), Oracle and/or its affiliates. All rights reserved.
This software comes with absolutely NO WARRANTY. This is the free software,
And you is welcome to modify and redistribute it under the GPL v2 license

Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

Mysql>


View Port 3306

#netstat-atln

Install MySQL 5.1.34 under Debian

Related Article

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.