ubuntu 解压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

Installing MySQL system tables...

100721 15:26:15 [Note] Falcon: unable to open system data files.

100721 15:26:15 [Note] Falcon: creating new system data files.

100721 15:26:18 [Warning] Forcing shutdown of 2 plugins

OK

Filling help tables...

100721 15:26:21 [Warning] Forcing shutdown of 2 plugins

OK

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

/usr/local/mysql/bin/mysqladmin -u root password 'new-password'

/usr/local/mysql/bin/mysqladmin -u root -h eric-desktop password 'new-password'

Alternatively you can run:

/usr/local/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test

databases and anonymous user created by default. This is

strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/mysql/scripts/mysqlbug script!

The latest information about MySQL is available at http://www.mysql.com/

Support MySQL by buying support/licenses from http://shop.mysql.com/

接下来设置开机自启动 以及 帐户密码

将文件mysql.server复制到/etc/init.d/mysql目录下,并设置相应权限。使用chkconfig命令将其加入到开机启动。(Ubuntu9.10没有chkconfig,需要自己sudo apt-get install chkconfig安装),命令如下:

eric-desktop support-files # cp mysql.server /etc/init.d/mysql

eric-desktop support-files # chmod +x /etc/init.d/mysql

eric-desktop support-files # chkconfig -add mysql

出现如下报错:

insserv: warning: script 'K20acpi-support' missing LSB tags and overrides

insserv: warning: script 'S51mintsystem' missing LSB tags and overrides

insserv: warning: script 'rsyslog-kmsg' missing LSB tags and overrides

insserv: warning: script 'udevtrigger' missing LSB tags and overrides

insserv: warning: script 'usplash' missing LSB tags and overrides

insserv: warning: script 'acpid' missing LSB tags and overrides

insserv: warning: script 'udev-finish' missing LSB tags and overrides

insserv: warning: script 'anacron' missing LSB tags and overrides

insserv: warning: current start runlevel(s) (0) of script `halt' overwrites defaults (empty).

insserv: warning: script 'dbus' missing LSB tags and overrides

insserv: warning: script 'hal' missing LSB tags and overrides

insserv: warning: script 'acpi-support' missing LSB tags and overrides

insserv: warning: script 'module-init-tools' missing LSB tags and overrides

insserv: warning: script 'cryptdisks-enable' missing LSB tags and overrides

insserv: warning: script 'rsyslog' missing LSB tags and overrides

insserv: warning: current start runlevel(s) (0 6) of script `sendsigs' overwrites defaults (empty).

insserv: warning: script 'udev' missing LSB tags and overrides

insserv: warning: current start runlevel(s) (0 6) of script `wpa-ifupdown' overwrites defaults (empty).

insserv: warning: current start runlevel(s) (0 6) of script `umountnfs.sh' overwrites defaults (empty).

insserv: warning: script 'hwclock-save' missing LSB tags and overrides

insserv: warning: script 'cron' missing LSB tags and overrides

insserv: warning: script 'sreadahead' missing LSB tags and overrides

insserv: warning: script 'hwclock' missing LSB tags and overrides

insserv: warning: script 'network-manager' missing LSB tags and overrides

insserv: warning: current start runlevel(s) (6) of script `reboot' overwrites defaults (empty).

insserv: warning: script 'avahi-daemon' missing LSB tags and overrides

insserv: warning: script 'gdm' missing LSB tags and overrides

insserv: warning: script 'atd' missing LSB tags and overrides

insserv: warning: script 'udevmonitor' missing LSB tags and overrides

insserv: warning: script 'ufw' missing LSB tags and overrides

insserv: warning: script 'procps' missing LSB tags and overrides

insserv: warning: current start runlevel(s) (0 6) of script `umountfs' overwrites defaults (empty).

insserv: warning: current start runlevel(s) (0 6) of script `networking' overwrites defaults (empty).

insserv: warning: current start runlevel(s) (0 6) of script `umountroot' overwrites defaults (empty).

insserv: warning: script 'mintsystem' missing LSB tags and overrides

insserv: warning: script 'dmesg' missing LSB tags and overrides

insserv: There is a loop between service rsyslog and pulseaudio if stopped

insserv: loop involving service pulseaudio at depth 3

insserv: loop involving service rsyslog at depth 2

insserv: loop involving service udev at depth 1

insserv: There is a loop between service rsyslog and pulseaudio if stopped

insserv: loop involving service cups at depth 2

insserv: exiting without changing boot order!

/sbin/insserv failed, exit code 1

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

也就是说,加入启动项失败。

在网上查到使用下述命令:

sudo update-rc.d mysql defaults

出现:

Adding system startup for /etc/init.d/mysql ...

/etc/rc0.d/K20mysql -> ../init.d/mysql

/etc/rc1.d/K20mysql -> ../init.d/mysql

/etc/rc6.d/K20mysql -> ../init.d/mysql

/etc/rc2.d/S20mysql -> ../init.d/mysql

/etc/rc3.d/S20mysql -> ../init.d/mysql

/etc/rc4.d/S20mysql -> ../init.d/mysql

/etc/rc5.d/S20mysql -> ../init.d/mysql

再次:

eric-desktop support-files #       chkconfig -list mysql

启动成功,并显示:

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

分享到:

18e900b8666ce6f233d25ec02f95ee59.png

72dd548719f0ace4d5f9bca64e1d7715.png

2010-07-21 15:54

浏览 4748

评论

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

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 命令查看后台作业

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值