LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-17-2003, 05:08 AM   #1
dai
Member
 
Registered: May 2002
Location: Wales
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328

Rep: Reputation: 30
mysql missing Perl DBD file


Hi all (again) when I try to use the mysql_setpermission command I get the following error

bash-2.05a# mysql_setpermission -u root
Password for user root to connect to MySQL:
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/i386-linux /usr/lib/perl5 /usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl /usr/lib/perl5/site_perl .) at (eval 7) line 3, <STDIN> line 1.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: ExampleP, Proxy.
at /usr/local/bin/mysql_setpermission line 65

What do I need to download and install to get this working???

Im running Slack8.1 and installed mysql 4.04 from source in /usr/local/

Last edited by dai; 02-17-2003 at 05:22 AM.
 
Old 02-17-2003, 06:14 AM   #2
dai
Member
 
Registered: May 2002
Location: Wales
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328

Original Poster
Rep: Reputation: 30
Okay Ive now managed to install the perl modules required.

Ive used following to setup a user dai1

bash-2.05a$ mysql_setpermission -u root
Password for user root to connect to MySQL:
######################################################################
## Welcome to the permission setter 1.2 for MySQL.
## made by Luuk de Boer
######################################################################
What would you like to do:
1. Set password for a user.
2. Add a database + user privilege for that database.
- user can do all except all admin functions
3. Add user privilege for an existing database.
- user can do all except all admin functions
4. Add user privilege for an existing database.
- user can do all except all admin functions + no create/drop
5. Add user privilege for an existing database.
- user can do only selects (no update/delete/insert etc.)
0. exit this program

Make your choice [1,2,3,4,5,0]: 3


Which database would you like to select:
You can choose from:
- bmsimple
- mysql
- test
Which database will it be (case sensitive): bmsimple
The database bmsimple will be used.

What username is to be created: dai1
Username = dai1
Would you like to set a password for [y/n]: n
We won't set a password so the user doesn't have to use it
We now need to know from what host(s) the user will connect.
Keep in mind that % means 'from any host' ...
The host please: %
Would you like to add another host [yes/no]: no
Okay we keep it with this ...
The following host(s) will be used: %.
######################################################################

That was it ... here is an overview of what you gave to me:
The database name : bmsimple
The username : dai1
The host(s) : %
######################################################################

Are you pretty sure you would like to implement this [yes/no]: yes
Okay ... let's go then ...

Everything is inserted and mysql privileges have been reloaded.


Ive then exited and attempted to connect to the database with the following

bash-2.05a$ mysql -u dai1 bmsimple
ERROR 1044: Access denied for user: '@localhost' to database 'bmsimple'

why am I getting an error about not being allowed to connect, when I use root I can connect to the database but any other account I cant.

Can somebody help????
 
Old 02-17-2003, 07:04 AM   #3
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
have u tried
%: mysql -u dai1
to login to mysql then later
mysql: use bmsimple;
would be worth trying i guess
cheers, jens
 
Old 02-17-2003, 07:17 AM   #4
dai
Member
 
Registered: May 2002
Location: Wales
Distribution: Slack 8.1, Gentoo 1.3a, Red Hat 7.3, Red Hat 7.2, Manrake 8.2
Posts: 328

Original Poster
Rep: Reputation: 30
yeah tried it

Ive fixed it now, instead of using the perl interface to configure it I did following (Hope this helps someone else)

#>mysql -u root -p
password : *******

SQL> GRANT ALL ON bmsimple.* TO dai1@'% ' IDENTIFIED BY '********';

SQL> GRANT ALL ON bmsimple.* TO dai1@'localhost' IDENTIFIED BY '********';

SQL> FLUSH Privileges

SQL>\q

#>mysql -u dai1 -p bmsimple
password:**********

No more error!!!! Its important to specify localhost on a seperate line if you want the user access to the server machine as the % only allows remote access.

Again I hope this will help other people at some point
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL_setpermission ?? MOMO Angel77 Linux - Newbie 0 08-01-2003 09:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration