how to install DBD::MySQL?

lona

Verified User
Joined
Dec 18, 2003
Messages
14
Location
Qatar
My provider left me puzzled and with a great challenge as he wants me to install the DBD::MySQL module myself.
I have server admin rights, but have no clue how to continue.
I found the module at www.cpan.org
But, what to do now? I have DBD::MySQL and DBI as a tar.gz.

Is there someone here who can talk me trough this? I am a real beginner. So talking me trough this means really start from almost turning on the computer.

I would appreciate it very much.
Thanks
Lona
 
Use cpan :)

# perl -MCPAN -e shell
cpan> install DBD::MySQL

Chris
 
Sorry for posting at the wrong forum. thought it was the good one
:(

Chris mentioned:
# perl -MCPAN -e shell
cpan> install DBD::MySQL

Ye, I know, but were to do this and how? As said I am very new to this and to know nothing . It sounds lik abracadabra to me.

I type this somewhere? Where??
Lona
 
Hello,

You must ssh into the server as root, then type the above commands. You'll need an ssh program, most people use "putty" to get in.

John
 
active perl but how to continue

Is active perl a good program to install the modules?
I downloaded it, but now I wonder how to continue as in ppm it says to type install and the name of the required module. Ok, but where to does ppm install it? On my own machine? That is not what I want. It needs to be installed on the server.

Or should i just give up as everything sounds to me as abracadabra.
is it easier to install DB file?

Lona
 
Everything you need to know from start to finish you do NOT need any knowledge in SSH or anything else for this - all you need to do is do what the below says!

#####################

If you are running windows download putty, an SSH client for windows:

http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

Once you have it, simply execute the program by double clicking the icon where you saved it. A box will appear

Hostname / IP Address: enter your servers main IP address
Port: 22
[o] SSH (tick the radio box)

Click the 'open' button to connect to your server.

You will now be prompted to enter a username to login as, you can use root directly or if you wish use admin then su - to root.
<enter> = press enter on your keyboard

username: root <ENTER>

you will now be promted for your admin password, enter this note characters do not display on the screen, it will remain blank although you are actually entering the password - IGNORE THIS

you should now be at command line, from here just enter the commands mentioned previously, to enter CPAN:

Code:
perl -MCPAN -e shell

you should now see another command line showing:

cpan>

here just enter:

Code:
install DBD::MySQL

You should have now successfully installed the module.

Chris
 
This looks like a really clear and good tutorial :)
Does putty work on a linux server machine? ( my computer is windows)

Another question at the moment: you said:
You will now be prompted to enter a username to login as, you can use root directly or if you wish use admin then su - to root.

with username does this mean the username I use when I enter the server? or is it just a new username?

Lona
 
lona said:
This looks like a really clear and good tutorial :)
Does putty work on a linux server machine? ( my computer is windows)

Another question at the moment: you said:


with username does this mean the username I use when I enter the server? or is it just a new username?

Lona

Putty runs on windows and connects to linux.... or anything else running ssh on port 22 :p

Username - root is simply root and admin is pretty much unprivileged user often used when direct root access is disabled.

Chris
 
ok, i have putty, but it disappeard after i tried to use my password. ( the password that i use to log on to the server normally) Is it by the way normal that I get a warning about the right server?

So, It seems I do not understand this. Sorry about that as English is not my own language and sometimes I seem to miss important things.

admin is pretty much unprivileged user often used when direct root access is disabled.
what do you mean with pretty much unpriviliged? :confused:

lona
 
The admin user cant do much..... considering its admin, which most people consider very high priviliged if not the highest (which would be root of course :D) if they don't know much about ssh / users with linux etc

Chris
 
so as i understand this in easy english it would mean I have no acces to the root???

very strange as my host asked me to install the module myself:confused:
lona
 
If its your server and you have 'admin' access to directadmin you more than likely have access to root... your host telling you that you have to install them yourself would more than likely mean your server is unmanaged.

Chris
 
ProWebUK said:
Use cpan :)

# perl -MCPAN -e shell
cpan> install DBD::MySQL

Chris

i get an error:

cpan> install DBD::MySQL
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Sun, 11 Apr 2004 02:57:36 GMT
Warning: Cannot install DBD::MySQL, don't know what it is.
Try the command

i /DBD::MySQL/

to find objects with matching identifiers.

What should i do?

and when i do a i /DBD::MySQL/ as suggested above:

cpan> i /DBD::MySQL/
Bundle Bundle::DBD::mysql (J/JW/JWIED/Msql-Mysql-modules-1.2219.tar.gz)
Module DBD::mysql (R/RU/RUDY/DBD-mysql-2.9003.tar.gz)
Module DBD::mysql::AutoTypes (G/GR/GRISHACE/DBD-mysql-AutoTypes-1.0.tar.gz)
Module DBD::mysql::GetInfo (R/RU/RUDY/DBD-mysql-2.9003.tar.gz)
Module DBD::mysql::Install (J/JW/JWIED/Msql-Mysql-modules-1.2219.tar.gz)
Module DBD::mysqlPP (O/OY/OYAMA/DBD-mysqlPP-0.04.tar.gz)
Module DBIx::DBSchema::DBD::mysql (I/IV/IVAN/DBIx-DBSchema-0.23.tar.gz)
Module SQL::AnyDBD::Mysql (T/TB/TBONE/SQL-AnyDBD-0.02.tar.gz)
8 items found
 
wget http://www.cpan.org/modules/by-module/DBD/DBD-mysql-2.9002.tar.gz
wget http://www.cpan.org/modules/by-module/DBD/DBI-1.38.tar.gz
tar xvzf DBI-1.38.tar.gz
tar xvzf DBD-mysql-2.9002.tar.gz
cd DBI-1.38
perl Makefile.PL
make
make install
cd ..
cd DBD-mysql-2.9002
perl Makefile.PL
make
make install
 
hostpc.com said:
wget http://www.cpan.org/modules/by-module/DBD/DBD-mysql-2.9002.tar.gz
wget http://www.cpan.org/modules/by-module/DBD/DBI-1.38.tar.gz
tar xvzf DBI-1.38.tar.gz
tar xvzf DBD-mysql-2.9002.tar.gz
cd DBI-1.38
perl Makefile.PL
make
make install
cd ..
cd DBD-mysql-2.9002
perl Makefile.PL
make
make install

it worked!!!

just that on above,m i had to use

unset LANG; perl Makefile.PL; make

for

perl Makefile.PL

after for cd DBD-mysql-2.9002 in your kind above instructions!

Thanks again!
 
If the perl -e shell -MCPAN fails while testing, you can still install the downloaded files..

cd /root/.cpan/build
Look for the DBD-mysql directory, go there, do a:
perl Makefile.PL
make; make install
 
etegration said:
i get an error:



What should i do?

and when i do a i /DBD::MySQL/ as suggested above:
this would have worked if the mysql part was spelled in all lower case letters.
 
Everytime I try any of the above for DBD::mysql on a RH9 server I get:
linux-thread-multi/auto/DBI at Makefile.PL line 295
Using DBI 1.38 installed in /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/DBI
Writing Makefile for DBD::mysql
[root@server DBD-mysql-2.9003]# make
Makefile:89: *** missing separator. Stop.

I normally do get it, but after 80 hours of no sleep I can't remember how.

Any suggestions?

Thanks.
 
Back
Top