在Oracle中使用脚本的一个错误

Posted by 猪头小队长 | 程序设计 | Wednesday 28 July 2004 14:46

Q:在Oracle中,使用脚本创建数据库(或其他)时出现错误(错误如下),而在终端直接输入sql没有问题。

错误1:
MGR-00072: Warning: PROCEDURE NAD_SP_CREATEAGENT created with compilation errors.
Errors for PROCEDURE NAD_SP_CREATEAGENT:
LINE/COL ERROR
——————————————————————————–
1/30 PLS-00103: Encountered the symbol "" when expecting one of the followin
2/58 PLS-00103: Encountered the symbol "" when expecting one of the followin
3/58 PLS-00103: Encountered the symbol "" when expecting one of the followin
4/56 PLS-00103: Encountered the symbol "" when expecting one of the followin
5/53 PLS-00103: Encountered the symbol "" when expecting one of the followin
6/53 PLS-00103: Encountered the symbol "" when expecting one of the followin
7/57 PLS-00103: Encountered the symbol "" when expecting one of the followin
8/55 PLS-00103: Encountered the symbol "" when expecting one of the followin

错误2:
MGR-00072: Warning: TYPE NAD_AD_OBJ created with compilation errors.

A:由于Dos/Windows下的编码与Unix/Linux下的编码不同所致,使用dos2unix命令将脚本转化之后即可

[@more@]

mysql忘掉了root密码

Posted by 猪头小队长 | 程序设计 | Wednesday 7 July 2004 11:24

用这个方法可以改掉密码,出处:www.freelamp.com by 徐永久
如果 MySQL 正在运行,首先杀之: killall -TERM mysqld。
启动 MySQL :/usr/bin/safe_mysqld –skip-grant-tables &
就可以不需要密码就进入 MySQL 了。
然后就是
>use mysql
>update user set password=password("new_pass") where user="root";
>flush privileges;
重新杀 MySQL ,用正常方法启动 MySQL 。

还有一个参数需要注意:mysql是否监听tcp端口,这个是在mysql的配置文件my.cnf中:skip-networking
如果有此开关,则不监听,如果想要那个3306则注释掉此开关。

[@more@]

mysql安装的一个常见问题:libmysqlclient

Posted by 猪头小队长 | 程序设计 | Tuesday 6 July 2004 13:07
在redhat下安装mysql常出现的错误:
[root@bbs bbs_soft_install]# rpm -ivh mysql-3.23.54a-11.i386.rpm
warning: mysql-3.23.54a-11.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
perl-DBD-MySQL is needed by mysql-3.23.54a-11
[root@bbs bbs_soft_install]# rpm -ivh perl-DBD-MySQL-2.1021-3.i386.rpm
warning: perl-DBD-MySQL-2.1021-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
libmysqlclient.so.10 is needed by perl-DBD-MySQL-2.1021-3
[root@bbs bbs_soft_install]#
这个libmysqlclient着实烦人,在redhat的安装盘里面,没有他的rpm包,一般来说,这样:
[root@bbs bbs_soft_install]# rpm -ivh mysql-3.23.54a-11.i386.rpm –nodeps
这样也可以安装的上,但是总是有些担心,:(,其实这个libmysqlclent在Mandrake的发行版可以很容易找到,例如这里:
http://wuarchive.wustl.edu/pub/linux/distributions/mandrake/updates/9.0/RPMS/
就可以下载到libmysql10-3.23.56-1.4mdk.i586.rpm
[root@bbs bbs_soft_install]# rpm -ivh libmysql10-3.23.56-1.4mdk.i586.rpm
warning: libmysql10-3.23.56-1.4mdk.i586.rpm: V3 DSA signature: NOKEY, key ID 22458a98
Preparing… ########################################### [100%]
1:libmysql10 ########################################### [100%]
[root@bbs bbs_soft_install]# rpm -ivh perl-DBD-MySQL-2.1021-3.i386.rpm
warning: perl-DBD-MySQL-2.1021-3.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing… ########################################### [100%]
1:perl-DBD-MySQL ########################################### [100%]
[root@bbs bbs_soft_install]# rpm -ivh mysql-3.23.54a-11.i386.rpm
warning: mysql-3.23.54a-11.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing… ########################################### [100%]
1:mysql ########################################### [100%]
[root@bbs bbs_soft_install]#
就可以顺利的安装了。
如果使用debian的话,安装的时候就是一种享受了,apt-get真是太方便了。hehe,redhat还缺少一个方便的包管理器。

[@more@]