技巧Technique分类
由于工作需要本人需要最大性能提高系统运行效率,作为服务器最好的集群性能提高方案,gentoo成为了一个不可避免的选择,经过4个小时研究,终于研究出来这个系统的流程和使用方法。整理如下
usb:
1 create iso / copy stage3 tar file into the usb
2 boot with root and login
3 config net-setup eth0/resolve.conf
4 fdisk with primary/extend/swap partition (type ext4/btrfs )
5 mount file system
6 extract stage file to /
7 tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
8 change settings for make.conf:
CFLAGS=”-O2 -march=native -mtune=native -pipe -fomit-frame-pointer”
CXXFLAGS=”$CFLAGS”
CHOST=”x86_64-pc-linux-gnu”
MAKEOPTS=”-j3″
ACCEPT_KEYWORDS=”~amd64″
9 mirrorselect -i -o >> /mnt/gentoo/etc/make.conf
10 # mount -t proc none /mnt/gentoo/proc
11 # mount -o bind /dev /mnt/gentoo/dev
12 Chroot/env-update/source /etc/profile
13 emerge –sync
14 emerge gentoo-sources/
15 cd /usr/src/linux/
16 make menuconfig
17 make && make modules_install
18 cp arch/i386/boot/bzImage /boot/kernel-3.0-gentoo
19 nano -w /etc/fstab
20 nano -w /etc/conf.d/hostname
21 nano -w /etc/conf.d/net
config_eth0=( “192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255″ )
routes_eth0=( “default via 192.168.0.1″ )
22 emerge grub
23 nano -w /boot/grub/grub.conf
default 0
timeout 30
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Gentoo Linux 3.0
root (hd0,1)
kernel /boot/kernel-3.0-gentoo root=/dev/sda3
title Gentoo Linux 3.0-gentoo (rescue)
root (hd0,1)
kernel /boot/kernel-3.0-gentoo root=/dev/sda3 init=/bin/bb
title Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1
24 grep -v rootfs /proc/mounts > /etc/mtab
25 grub-install –no-floppy /dev/sda
26 reboot
Google Chrome 的about:config设置是about:flags
设置里面最有价值的是视频独立播放功能。通过开启了可以全屏置顶。非常方便。
PSP目前破解版本支持5.55及6.0的游戏了
PSP1000/2000(非V3)5.50GEN-C自制系统升级教程
声明:此教程仅适用于PSP1000及PSP2000(非v3)自制系统用户。PSP3000\PSP2000V3\PSPgo不可用。目前5.50GEN-C并不稳定,不推荐玩家升级到此系统。
PSP 5.50GEN-C更新:
支持5.55及6.00加密的ISO文件,即目前新发布的游戏均可直接在5.50GEN-C上运行,无需进行解密操作。
升级需要:PSP系统3.71 M33以上的自制系统,测试机型:PSP20005.50GEN-B2系统。
如果你满足升级条件,请跟着以下的步骤,将你的PSP升级至PSP5.50GEN-C。
第一步:下载文件
首先这里下载PSP GEN-C升级软件:点击这里下载软件
然后使用USB连接电脑和PSP,将下载好的文件解压缩,将解压得到的两个文件都拷贝至PSP记忆棒的根目录下即可完成安装(如提示覆盖则选择全部覆盖即可)。
第二步:系统升级
文件安装完成后,打开PSP,进入游戏列表(游戏 – Memory Stick)下,此时出现如下图的5.50GEN-C升级软件图标。
按○键进入如下图所示的升级界面,选择“Enter”。
接下来选择第一项,按○键确认升级,开始升级。
升级过程中,请注意电量要大于78%,另外不要拔出记忆棒。 耐心等待进度条完成,升级完成之后,会出现下图选项,按×键重启,或按○键关机即可完成升级。
注意:升级完成,在XMB界面按Select无法呼出vsh菜单。需要你关机之后,再开机时按住R键不放,进入恢复模式菜单,选择Configuration后,将Use VshMenu改为VshMenu即可。
升级常见问答:如果以下问答没有解答您的问题,请到这里提问。
问:我安装完这个系统,觉得不好用,能降回5.00M33系统吗?
答:当然可以,使用RF1.6就可以方便的给PSP1000/2000(非V3)降级,具体操作请查看RF1.6使用教程。
问:我是PSP3000、PSP2000V3、PSPgo,可以用这个自制系统吗?
答:不支持,PSP3000和PSP2000v3玩家们可以先用GD、ebex这两个游戏破解软件来破解游戏,一样可在5.03的自制系统上玩。PSPgo目前无破解,请去PS网上商店购买正版游戏。
问:为什么我升级之后玩不了ISO了?
答:基本上遇到这种问题的朋友是没有切换正确的ISO引导模式,或者并没有将ISO放到正确的位置,具体解决方案请查看教程1(判断ISO文件是否正确)与教程2(教你怎么使用XMB快捷菜单,内含切换ISO引导模式的方法)。
问:已经破解的游戏还能在这个系统上玩吗?
答:可以,但根据网友反映,部分游戏在读取之前的存档时,会出现死机现象。遇此情况请舍弃之前的存档,重新开始游戏即可。
问:升级之后开机会死机,怎么办?
答:请按住R键开机,进入恢复模式,格式化F1。具体的操作过程请查看这里。
问:在XMB下按Select呼不出VSH Menu菜单怎么办?
答:在关机的状态下按住R键开机,进入恢复模式,在Configuration → Use VshMenu,设置括号里内容为Currently:VshMenu即可。
问:升级后确认键○变成了×,怎么办?
答:请按住R键开机,进入恢复模式,在Registry hacks → Button assign(currently:× is enter),按×键改成Button assign(currently:○ is enter)即可。
注意…该版本不是最稳定版本…
RESTful HTTP in practice
Posted by Gregor Roth on Aug 18, 2009
- Community
- SOA
- Topics
- Web Services ,
- WOA ,
- REST
- Tags
- URI
This article gives a short overview about the basics of RESTful HTTP and discusses typical issues that developers face when they design RESTful HTTP applications. It shows how to apply the REST architecture style in practice. It describes commonly used approaches to name URIs, discusses how to interact with resources through the Uniform interface, when to use PUT or POST and how to support non-CRUD operations.
RelatedVendorContent
Intel® SOA Expressway Performance Comparison to IBM® DataPower XI50
Comprehensive Threat Protection for REST, SOA, and Web 2.0 Applications
Business Benefits of Open Source SOA
Lean development governance whitepaper by Scott Ambler and Per Kroll
The First Few Milliseconds of an HTTPS Connection
The First Few Milliseconds of an HTTPS Connection
Posted by Jeff Moser on Jul 27, 2009
- Community
- Architecture
- Topics
- Security
- Tags
- HTTP
What happens when one clicks on “Proceed to Checkout” on a website after browsing through their offerings? This is an analysis of the first milliseconds when an HTTPS connection with Amazon is established. A new page is loaded when proceeding to checkout:
sendmail: 指南与配置介绍
官方手册:http://www.sendmail.org/doc/sendmail-current/doc/op/op.pdf
With the growth of the Internet, e-mail has quickly become the main vehicle to spread information through the public at large. As the demand for fast, cheap and reliable e-mail grows, more individuals are turning to Linux to provide a fast, cheap and reliable solution.
sendmail was originally developed by Eric Allman, in 1979, as “delevermail”, which first shipped with BSD 4.0. This program was not very flexible and required configuration at compile time. With the growth of TCP protocol and other factors, it became obvious that delevermail was not flexible enough to handle these new demands. Eric Allman had to recreate sendmail from scratch, and what he produced has become the standard for MTAs. Rather than reject messages that were did not conform to protocols, sendmail is designed to be tolerant of these messages. For those individuals who have never configured an e-mail server, this article will demonstrate how to configure sendmail 8.11.2 after a fresh install of Red Hat Linux 7.1.
By default, sendmail 8.11 is installed during the Red Hat Linux 7.1 installation. As Red Hat has progressed over the years, the installation process has become very easy. Though this article will not go into installation details, further documentation is provided on the Red Hat CD set.
For your new e-mail server to work, you must first get all the DNS issues straight. First, add the hostname and IP address for the new e-mail server to your DNS server and confirm the address with nslookup:
[root@testmail /root]# nslookup -sil testmail.blank.com Server: 192.168.100.1 Address: 192.168.100.1#53 Name: testmail.blank.com Address: 192.168.100.134
It is also important that your administrator put a reverse DNS entry to prevent delays in mail delivery. Most modern e-mail servers use reverse lookup as a means of authentication for mail transfer. Again, confirm this setting is correct using the nslookup command on your IP address.
[root@testmail /root]# nslookup -sil 192.168.100.134 Server: 192.168.100.1 Address: 192.168.100.1#53 134.100.168.192.in-addr.arpa name = TESTMAIL.blank.com.
As you can see, the DNS entries are setup and working correctly, so let’s move on to actually configuring sendmail. By default, sendmail installations on Red Hat will only allow SMTP traffic on the localhost. The output of netstat -nl will show you all ports that have a dæmon listening; note the line that says 127.0.0.1:25. This means the server is only listening on the loop back interface for connections on port 25 (SMTP).
[root@testmail /root]# netstat -nl Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN udp 0 0 0.0.0.0:32768 0.0.0.0:* udp 0 0 0.0.0.0:667 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node Path unix 2 [ ACC ] STREAM LISTENING 1119 /dev/gpmctl unix 2 [ ACC ] STREAM LISTENING 1172 /tmp/.font-unix/fs7100
This will keep your mail dæmon from accepting e-mail from any computer except the localhost. To fix this issue, we must tell sendmail to listen for connections on the external interface. In the case of our new server, there is only one Ethernet card, with eth0 being the external interface. To confirm the IP on eth0, simply perform an ifconfig. Depending on your configuration, this IP can be different than the address defined by your DNS server, but in our example the addresses are the same.
[root@testmail /root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:60:97:DE:E9:99
inet addr:192.168.100.134 Bcast:192.168.100.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12421 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:10 Base address:0xe000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
This machine has an address of 192.168.100.134 on the eth0 interface. Once you have that address, edit the /etc/sendmail.cf file and configure the sendmail dæmon to listen on the address.
# SMTP daemon options O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
change to
O DaemonPortOptions=Port=smtp,Addr=192.168.100.134, Name=MTA
Once you have completed this task, save this file and restart the sendmail dæmon using the rc script /etc/init.d/sendmail.
[root@testmail /root]# /etc/init.d/sendmail restart Shutting down sendmail: [ OK ] Starting sendmail: [ OK ] [root@testmail /root]#
Now check to see if there has been a change with the netstat -nl command. As you can see the output clearly shows that a dæmon (sendmail) is listening on port 25 of the IP address 192.168.100.134 that is assigned to our interface eth0.
[root@testmail /root]# netstat -nl Active Internet connections (only servers) Proto Recv-Q send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 192.168.100.134:25 0.0.0.0:* LISTEN udp 0 0 0.0.0.0:32768 0.0.0.0:* udp 0 0 0.0.0.0:667 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node Path unix 2 [ ACC ] STREAM LISTENING 1119 /dev/gpmctl unix 2 [ ACC ] STREAM LISTENING 1172 /tmp/.font-unix/fs7100 [root@testmail /root]#
Now that we have sendmail accepting external connections, we need to assign the domains that can be accepted. This can be accomplished with the /etc/mail/local-host-names file. Simply put the domain name, blank.com, in the file.
# local-host-names - include all aliases for your machine here. blank.com
Once this information is saved in this file, restart the sendmail dæmon with the rc script sendmail found in /etc/init.d/sendmail restart. sendmail can accept e-mail for multiple domains on the same server. Insert the domain name into this file each time you want to add a new domain.
You now have a fully working e-mail server from the localhost. It can accept e-mail from anywhere in the world, but can only send e-mail or relay e-mail from the localhost. Another default security feature is that sendmail will not allow the relay of any mail to prevent spam originating from your server. If your users log directly into the server, this configuration does not need modification. But if your organization is like most, clients are using e-mail from remote sites. If your users use clients like KMail or Outlook Express, you will need to allow those machines to relay e-mail using your new server, but you do not want to open your site up to complete relay. This can be done by adding the following line to the /etc/mail/access file and running the command make access.db after saving that file.
blank.com RELAY # Check the /usr/share/doc/sendmail-8.11.2/README.cf file for a description # of the format of this file. (search for access_db in that file) # The /usr/share/doc/sendmail-8.11.2/README.cf is part of the sendmail-doc # package. # # by default we allow relaying from localhost... localhost.localdomain RELAY localhost RELAY 127.0.0.1 RELAY blank.com RELAY [root@testmail mail]# make access.db [root@testmail mail]#
The make access.db command will include your new setting in the hash database used by sendmail to determine who can relay e-mail off your server. This will allow connections from inside the blank.com domain to relay e-mail from your new mail server, and prevent use of the service to nonmembers. One can also put a subnet of IPs, such as 192.168, to limit inside a domain. Keep in mind that if this setting is to open, spammers can bounce huge amounts of e-mail off your system.
Now that you can accept e-mail from anywhere in the world, have configured your domain, and allowed relay e-mail for approved clients, you may want to allow remote access to that mail. This can be accomplished with IMAP or POP. With a default server install, not all required packages are installed to make POP/IMAP mail work. These services can be obtained by the installation of the imap-2000-9 rpm package. To check the install status of this package use the following command: rpm -aq | grep -i imap. If no package is found, insert Disk 2 of the Red Hat 7.1 installation disk set into your cd-rom and mount that media. To accomplish this use the mount /dev/cdrom /mnt/cdrom command.
[root@testmail mail]# mount /dev/cdrom /mnt/cdrom
mount: block device /dev/cdrom is write-protected, mounting read-only
(Successful Mount of Read-Only Media)
Once mounted you can install the package with rpm -Uvh
/mnt/cdrom/RedHat/RPMS/imap-2000-9.i386.rpm.
[root@testmail mail]# rpm -Uvh
/mnt/cdrom/RedHat/RPMS/imap-2000-9.i386.rpm
Preparing... ###########################################
[100%]
1:imap ###########################################
[100%]
As you can see, when I run the rpm search, rpm -aq | grep -i
imap the IMAP package is displayed with output.
[root@testmail mail]# rpm -aq | grep -i imap
imap-2000-9
[root@testmail mail]#
With the correct package install, you now need to enable POP3 connections to your new e-mail server. This can be accomplished in the /etc/xinetd.d directory by modifying the ipop3 file. Set the value for disable to no, and save the file. Remember to maintain the case as it appears in the file.
# default: off
# description: The POP3 service allows remote users to access their mail
\
# using an POP3 client such as Netscape Communicator, mutt,
\
# or fetchmail.
service pop3
{
socket_type = stream
wait = no
user = root
server = /usr/sbin/ipop3d
log_on_success += USERID
log_on_failure += USERID
disable = no
}
Now you need to restart the xinetd dæmon to make the new setting work. This is possible by using the rc script /etc/init.d/xinetd. Simply issue the restart command as seen below.
[root@testmail xinetd.d]# /etc/init.d/xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ] [root@testmail xinetd.d]#
Now send a test e-mail to your new server and connect to the server via your favorite pop client. You should now be able to access your e-mail via POP protocol.
One final consideration about your new server is performance. You may receive complaints about slow connection to your POP server if the client traffic is being initiated from behind a firewall. The reason for this delay is that your e-mail server initiates a IDENT session with the client to confirm the identity of the client. If there is no response to that query, the server will invoke a timeout value set by default to 5 seconds. This value can be reduced to 1 second to remove most of the delay caused by IDENT. To change this value edit the /etc/sendmail.cf file, and reduce the timeout value to the desired value.
# timeouts (many of these) #O Timeout.ident=5s change to O Timeout.ident=1s
Your e-mail server is now working and providing service to your users. There are many more configurations for sendmail that are beyond the scope of this article. Linux will provide a very stable, robust platform for your e-mail needs. To find more information about sendmail visit www.sendmail.org.
Eric Jorn Seneca is a UNIX system engineer in Baton Rouge, Louisiana.
Redhat AS4 sendmail m4配置文件找不到的解决方法
邮件模板在做m4命令时候发生错误,导致原来的sendmail.cf文件空白了.
提示如下错误
# m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
/etc/mail/sendmail.mc:10: m4: Cannot open /usr/share/sendmail-cf/m4/cf.m4: No such file or directory
#
是因为sendmail-cf没装.
对于redhat as4来说,可以下载下面的rpm包
ftp://ftp.rediris.es/volumes/vol3/scientificlinux.org/scientific/44/i386/SL/RPMS/sendmail-cf-8.13.1-3.RHEL4.5.i386.rpm
然后安装:
rpm -ivh sendmail-cf-8.13.1-3.RHEL4.5.i386.rpm
安装后:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
/etc/init.d/sendmail restart
就好了
习惯了ubuntu的服务器管理…最近在做一个客户项目不得不切换到redhat上面…好吧…多一个经验是一个
首先查看自己服务器是啥,输入lsb_release -a 我的信息如下:
LSB Version: :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: RedHatEnterpriseAS
Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 3)
Release: 4
Codename: NahantUpdate3
输入passwd root修改root用户的密码,以此类推, passwd 用户名 就是修改某用户密码.
如果用useradd增加新用户时,还需使用passwd命令为每一位新增加的用户设置口令;
每个用户以后可以用passwd改变自己的口令。
只有超级用户可以使用“passwd 用户名”修改其他用户的口令,普通用户只能用不带参数的passwd命令修改自己的口令。
例如:
# passwd root
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully
#
输入正确后,这个新口令被加密并放入/etc/shdow文件。选取一个不易被破译的口令是很重要的。
MySQL数据的导出和导入工具:mysqldump [转]
导出要用到MySQL的mysqldump工具,基本用法是:
shell> mysqldump [OPTIONS] database [tables]
如果你不给定任何表,整个数据库将被导出。
通过执行mysqldump –help,你能得到你mysqldump的版本支持的选项表。
注意,如果你运行mysqldump没有–quick或–opt选项,mysqldump将在导出结果前装载整个结果集到内存中,如果你正在导出一个大的数据库,这将可能是一个问题。
–add-locks
在每个表导出之前增加LOCK TABLES并且之后UNLOCK TABLE。(为了使得更快地插入到MySQL)。
–add-drop-table
在每个create语句之前增加一个drop table。
–allow-keywords
允许创建是关键词的列名字。这由表名前缀于每个列名做到。
-c, –complete-insert
使用完整的insert语句(用列名字)。
-C, –compress
如果客户和服务器均支持压缩,压缩两者间所有的信息。
–delayed
用INSERT DELAYED命令插入行。
-e, –extended-insert
使用全新多行INSERT语法。(给出更紧缩并且更快的插入语句)
-#, –debug[=option_string]
跟踪程序的使用(为了调试)。
–help
显示一条帮助消息并且退出。
–fields-terminated-by=…
–fields-enclosed-by=…
–fields-optionally-enclosed-by=…
–fields-escaped-by=…
–fields-terminated-by=…
这些选择与-T选择一起使用,并且有相应的LOAD DATA INFILE子句相同的含义。
LOAD DATA INFILE语法。
-F, –flush-logs
在开始导出前,洗掉在MySQL服务器中的日志文件。
-f, –force,
即使我们在一个表导出期间得到一个SQL错误,继续。
-h, –host=..
从命名的主机上的MySQL服务器导出数据。缺省主机是localhost。
-l, –lock-tables.
为开始导出锁定所有表。
-t, –no-create-info
不写入表创建信息(CREATE TABLE语句)
-d, –no-data
不写入表的任何行信息。如果你只想得到一个表的结构的导出,这是很有用的!
–opt
同–quick –add-drop-table –add-locks –extended-insert –lock-tables。
应该给你为读入一个MySQL服务器的尽可能最快的导出。
-pyour_pass, –password[=your_pass]
与服务器连接时使用的口令。如果你不指定“=your_pass”部分,mysqldump需要来自终端的口令。
-P port_num, –port=port_num
与一台主机连接时使用的TCP/IP端口号。(这用于连接到localhost以外的主机,因为它使用 Unix套接字。)
-q, –quick
不缓冲查询,直接导出至stdout;使用mysql_use_result()做它。
-S /path/to/socket, –socket=/path/to/socket
与localhost连接时(它是缺省主机)使用的套接字文件。
-T, –tab=path-to-some-directory
对 于每个给定的表,创建一个table_name.sql文件,它包含SQL CREATE 命令,和一个table_name.txt文件,它包含数据。 注意:这只有在mysqldump运行在mysqld守护进程运行的同一台机器上的时候才工作。.txt文件的格式根据–fields-xxx和 –lines–xxx选项来定。
-u user_name, –user=user_name
与服务器连接时,MySQL使用的用户名。缺省值是你的Unix登录名。
-O var=option, –set-variable var=option设置一个变量的值。可能的变量被列在下面。
-v, –verbose
冗长模式。打印出程序所做的更多的信息。
-V, –version
打印版本信息并且退出。
-w, –where=’where-condition’
只导出被选择了的记录;注意引号是强制的!
“–where=user=’jimf’” “-wuserid>1″ “-wuserid<1″
最常见的mysqldump使用可能制作整个数据库的一个备份:
mysqldump –opt database > backup-file.sql
但是它对用来自于一个数据库的信息充实另外一个MySQL数据库也是有用的:
mysqldump –opt database | mysql –host=remote-host -C database
由于mysqldump导出的是完整的SQL语句,所以用mysql客户程序很容易就能把数据导入了:
shell> mysqladmin create target_db_name
shell> mysql target_db_name < backup-file.sql
就是
shell> mysql 库名 < 文件名
————————————————————————————-
mysql备份导入数据库手记
用mysqldump
把一个库导出到一个SQL文件
mysqldump db_name > /path/name.sql -uroot -p
如果数据库太大,压缩导出
mysqldump db_name | gzip > /path/name.sql -u root -p
备份全部的库
mysqldump –all-databases > /path/name.sql -u root -p
mysqldump –all-databases | gzip > /path/name.gz -uroot -p
备份一个单独或者几个表
mysqldump db_name tab_name > /path/sqlname.sql -u root -p
恢复数据 导入数据
mysql db_name < backup-file.sql -u root -p
有一种用mysql db_name < backup-file.sql -u root -p
第二种方法:
mysql -u root -p
use db_name
. /path/dbname.sql
这种方法保险点,因为有时我用 db_name < dbname.sql有问题
用第二种方法可以的
…………………………………………………………
添加mysql用户mysqlname 密码为password ,赋予dbname数据库所有权限
mysql> grant all on dbname.* to mysqlname@localhost identified by ‘password’;
mysql > grant select,insert,update,delete,create,drop on 数据库名.* to 用户(新建)@localhost identified by ‘密码’;
或者直接修改mysql表
mysql > insert into user(host,user,password) values(‘%’,'user_name’,password(“you password”));
mysql > set password for user_name=password(“you_password”)
以上两种必须进行重载授权表(./scripts/mysql_install_db)
或者在shell环境下
mysqladmin -u root password “you password”





