linux 下 mysql源码包的安装--
(9页)
本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦!
9.9 积分
linux 下 MySQL源码包的安装>> linux 下 MySQL源码包的安装 实验环境 VMysql-4.0.27.tar.gz 下载源码包 copy 到linux [rootlocalhost ~]# cd /tmp [rootlocalhost tmp]# ls gconfd-lao-helper-manager-socket-root gconfd-root scim-panel-socket:0-lao-panel-socket:0-root linux_v1.0.2-beta1_i386 scim-socket-frontend-root linux_v1.0.2-beta1_i386.tar.gz sealert.log mapping-laoapping-root virtual-root.Kez8K1 mysql-4.0.27.tar.gz VM-bridge-0.3.0.lockfile-0localhost:0.0 VM-bridge-0.3.0.socket-0localhost:0.0 vmp]# [rootlocalhost tmp]# tar zxvf mysql-4.0.27.tar.gz 把源码包mysql-4.0.27.tar.gz 解压到当前目录 图片看不清楚?请点击这里查看原图(大图)。 [rootlocalhost tmp]# cd mysql-4.0.27 进入mysql-4.0.27目录 [rootlocalhost mysql-4.0.27]# ls acconfig.h configure.in INSTALL-SOURCE missing regex acinclude.m4 COPYING isam mkinstalldirs scripts aclocal.m4 dbug libmysql myisam sql bdb depp libmysqld myisammrg sql-bench BUILD Docs libmysql_r mysql-test strings ChangeLog EXCEPTIONS-CLIENT ltconfig mysys support-files client extra ltmain.sh os2 tools config.h.in include Makefile.in pstack vio config.sub innobase man readline configure install-sh merge README [rootlocalhost mysql-4.0.27]# INSTALL-SOURCE这里面有你需要的安装命令 添加mysql用户组 [rootlocalhost mysql-4.0.27]# groupadd mysql You have mail in /var/spool/mail/root 添加mysql用户 并指定到mysql组中 [rootlocalhost mysql-4.0.27]# useradd -g mysql mysql [rootlocalhost mysql-4.0.27]# [rootlocalhost mysql-4.0.27]# echo /* Linuxthreads */ gt;gt; /usr/include/pthread.h 你也可以直接运行下面这条命令直接执行编译准备,如果有错误,试试上面得阴影部分命令 [rootlocalhost mysql-4.0.27]# ./configure --prefix=/usr/local/mysql 编译前的准备,指定安装目录到/usr/local/mysql 试计算机性能不同,时间略有差别 图片看不清楚?请点击这里查看原图(大图)。 [rootlocalhost mysql-4.0.27]# make 编译过程123下一页 >>>>这篇文章来自..,。 图片看不清楚?请点击这里查看原图(大图)。 [rootlocalhost mysql-4.0.27]# make install 编译安装 稍等 图片看不清楚?请点击这里查看原图(大图)。 [rootlocalhost mysql-4.0.27]# cp support-files/my-medium.f /etc/my.f 复制mysql配置文件 [rootlocalhost mysql-4.0.27]# cd /usr/local/mysql 进入安装目录 [rootlocalhost mysql]# bin/mysql_install_db --user=mysql 使用mysql用户 初始化数据库 Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables 090501 15:30:45 /usr/local/mysql/libexec/mysqld: Shutdoysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSySQL root USER ! To do so, start the server, then issue the folloands: /usr/local/mysql/bin/mysqladmin -u root passysql/bin/mysqladmin -u root -h localhost.localdomain passanual for more instructions. You can start the MySQL daemon ysql ; /usr/local/mysql/bin/mysqld_safe You can test the MySQL daemon arks in the 'sql-bench' directory: cd sql-bench ; perl run-all-tests Please report any problems ysql/bin/mysqlbug script! The latest information about MySQL is available on the ysql.[/url] Support MySQL by buying support/licenses at [url]shop.mysql.[/url] [rootlocalhost mysql]# [rootlocalhost mysql]# choysql]# choysql var 改变var的属主为mysql [rootlocalhost mysql]# chgrp -R mysql . 改变当前目录的属组为mysql [rootlocalhost mysql]# [rootlocalhost mysql]# bin/mysqld_safe --user=mysql 后台启动mysql服务 为后台启动 [1] 17776 [rootlocalhost mysql]# Starting mysqld daemon /usr/local/mysql/var [rootlocalhost mysql]# [rootlocalhost mysql]# /usr/local/mysql/bin/mysql 登陆到mysql数据库 ySQL monitor. mands end ySQL connection id is 1 to server version: 4.0.27-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer.上一页123下一页 >>>>这篇文章来自..,。 mysqlgt; mysqlgt; shoysql | | test | +----------+ 2 roysqlgt; mysqlgt; ? 查询命令 For the plete MySQL Manual online visit: [url]umentation[/url] For info on technical support from MySQL developers visit: [url]support[/url] For info on MySQL books, utilities, consultants, etc. visit: [url]portal[/url] List of all MySQL mands: (mands must appear first on line and end for `help'. clear (\c) Clear mand. connect (\r) Reconnect to the server. Optional arguments are db and host. edit (\e) Edit mand and to mysql server, display result vertically. exit (\q) Exit mysql. Same as quit. go (\g) Send mand to mysql server. nopager (\n) Disable pager, print to stdout. notee (\t) Don't and. prompt (\R) Change your mysql prompt. quit (\q) Quit mysql. rehash (\#) Rebuild pletion hash. source (\.) Execute a SQL script file. Takes a file name as an argument. status (\s) Get status information from the server. system (\!) Execute a system shell mand. tee (\T) Set outfile [to_outfile]. Append everything into given outfile. use (\u) Use another database. Takes database name as argument. Connection id: 2 (Can be used ysqladmin kill) mysqlgt; quit Bye [rootlocalhost mysql]# 退出数据库上一页123>>>>这篇文章来自..,。 关 键 词: linux下mysql源码包的安装--
天天文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。