首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

Ubuntu 9.10上安装配置mysql 6.0.10

2012-07-03 
Ubuntu 9.10下安装配置mysql 6.0.10?安装到usr/local/mysql中解压文件释放后将名称改为mysql复制此文件夹

Ubuntu 9.10下安装配置mysql 6.0.10

?

安装到usr/local/mysql中


解压文件


释放后将名称改为mysql


复制此文件夹到usr/local下


sudo chmod -R 777 mysql


sudo cp /usr/local/mysql/surport-file/my-small.cnf???? /etc/my.cnf

注意下面的操作 命令执行的位置很重要,不然会说找不到


cd /usr/local/mysql


此时因为还没有初始化数据库, 直接 ./bin/mysqld 是成功不了的,你可以试试

pwd 显示
/usr/local/mysql??????????????? (注意此时必须在这个目录下)
然后


scripts/mysql_install_db


出现:

?

eric-desktop mysql # scripts/mysql_install_db
chown: invalid user: `mysql'
chown: invalid user: `mysql'
chown: invalid user: `mysql'


Installing MySQL system tables...
100721 15:17:56 [ERROR] Fatal error: Can't change to run as user 'mysql' ;? Please check that the user exists!

100721 15:17:56 [ERROR] Aborting

100721 15:17:56 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=0
read_buffer_size=262144
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 49325 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = (nil) thread_stack 0x30000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x2d) [0x86f53fd]
/usr/local/mysql/bin/mysqld(handle_segfault+0x39f) [0x8265ddf]
[0xcd8400]
/usr/local/mysql/bin/mysqld [0x8264f74]
/usr/local/mysql/bin/mysqld(unireg_abort+0x30) [0x8267690]
/usr/local/mysql/bin/mysqld(main+0xac6) [0x826bad6]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x674b56]
/usr/local/mysql/bin/mysqld(__fxstat64+0xad) [0x819b5a1]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

Installation of system tables failed!? Examine the logs in
/home/oem/Data for more information.

You can try to start the mysqld daemon with:

??? shell> /usr/local/mysql/bin/mysqld --skip-grant &

and use the command line tool /usr/local/mysql/bin/mysql
to connect to the mysql database and look at the grant tables:

??? shell> /usr/local/mysql/bin/mysql -u root mysql
??? mysql> show tables

Try 'mysqld --help' if you have problems with paths.? Using --log
gives you a log in /home/oem/Data that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com/.? Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS.? Another information source are the
MySQL email archives available at http://lists.mysql.com/.

Please check all of the above before mailing us!? And remember, if
you do mail us, you MUST use the /usr/local/mysql/scripts/mysqlbug script!

?

?

?

说用户“mysql”不合法,于是,打开/etc/mysql/my.cnf 修改如下:

?

user??? ??? = root
pid-file??? = /var/run/mysqld/mysqld.pid
socket??? ??? = /var/run/mysqld/mysqld.sock
port??? ??? = 3306
basedir??? ??? = /usr/local/mysql
datadir??? ??? = /home/oem/Data
tmpdir??? ??? = /tmp
skip-external-locking

?

?

然后到/usr/mysql/目录下,再次:scripts/mysql_install_db

?

mysql                     0:off  1:off  2:on   3:on   4:on   5:on   6:off
?

?

?

1 楼 csdn_zuoqiang 2010-07-21   启动mysql:
sudo /etc/init.d/mysql start

在启动管理init.d里关于mysql的命令有

本人常用的:
sudo /etc/init.d/mysql  start
sudo /etc/init.d/mysql  stop
sudo /etc/init.d/mysql  restart

不常用的:
sudo /etc/init.d/mysql  reload
sudo /etc/init.d/mysql  force-reload
sudo /etc/init.d/mysql  status



2 楼 csdn_zuoqiang 2010-07-21   ubuntu进程管理

ps 显示当前进程

显示进程信息,参数可省略 -
        aux 以BSD风格显示进程 常用
        -efH 以System V风格显示进程
        -e , -A 显示所有进程
        a 显示终端上所有用户的进程    
        x 显示无终端进程(不再终端上的进程)
        u 显示用户等详细信息 (user)    没有-
        f 树状显示
        w 完整显示信息
        l 显示长列表
    示例:
    ps alx                  另一种常用输出格式
    ps aux | less           将输出通过管道,使用 less 查看
    ps aux | grep <关键字>   通过关键字查找进程
    ps -l 显示详细信息
    ps -u 以用户的格式显示
    ps -e 显示所有进程
    ps –ef | grep mysql         //查看mysql的进程  mysql可以是进程号

F 进程状态标志 ubuntu
S 进程状态代码
UID 进程执行者ID
PPID 父进程标识(parent process ID)
PRI 进程执行的优先级(priority)
NI 进程执行优先级的nice值,负值表示其优先级较高
SZ 进程占用的内存大小
WCHAN 进程或系统调用等待时的地址

%CPU cpu使用百分比
%MEM 内存使用百分比
VSZ 占用虚拟内存大小
RSS 占用物理内存大小
START 进程开始时间

kill 删除进程

kill pid 删除指定pid的进程
kill -l 查看所有可供传送的信号
kill -9 pid 强制删除进程,传送的是SIGKILL信号
kill -15 pid 强制删除进程,传送的是SIGTERM信号
kill -HUP pid 重启pid进程

free 查看内存使用状态

free -s 10 每10秒检查内存使用情况
nice 设置执行优先级,-20~19,19最低

sudo nice –2 vi 将vi的优先级调为-2
renice 修改执行优先级,-20~19,19最低

top 动态显示进程

按”P”键 按CPU使用时间排序
按”M”键 按内存使用多少排序
按”T”键 按执行时间多少排序

按”u”键 监视特定用户
按”k”键 删除进程

top -d 10 指定更新时间
lsof -p 查看进程打开的文件
jobs 命令查看后台作业

3 楼 csdn_zuoqiang 2010-07-23   eclipse添加tomcat server的时候出现如下错误

could not load the Tomcat Server configuration at Servers\tomcat V5.0 Server @ localhost-config

将原来的Server删掉,重新配置 一个,就好了,至少我是这样的,可以试试看!


或者遇到权限问题,可以尝试修改conf文件夹以及下面的几个配置文件的权限修改为默认(chmod  755  ***)



下面的参照:http://blog.csdn.net/dunhuacc1234/archive/2010/05/10/5576118.aspx


今天在eclipse想把之前的Tomcat 6删掉,重新配置一个,不料没有下一步

Cannot create a server using the selected type 这句话出现在窗口上面,应该不是很解决的问题.......

重启下 eclipse,还是不行哦

出绝招了,呵呵.....上网搜搜

还真的找到解决的方法了,如下:

1.退出 eclipse

2.到[工程目录下]/.metadata/.plugins/org.eclipse.core.runtime

3.把org.eclipse.wst.server.core.prefs和 org.eclipse.jst.server.tomcat.core.prefs这两个文件去掉

4.重启eclipse

热点排行