PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > Moving MySQL database from one machine to another and remotely accessing dbs?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

Moving MySQL database from one machine to another and remotely accessing dbs?

Réponse
 
LinkBack Outils de la discussion
Vieux 10/09/2007, 15h10   #1
Martin Waller
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Moving MySQL database from one machine to another and remotely accessing dbs?

Hi,

I'm using MySQL 4.1 on Etch and have a database (that I created) on
another machine (still Sarge) that I want to transfer to the other
before upgrading to etch on that machine also. Where should I look to
find out how to do this? Is it just a matter of locating the database
and copying or is it more subtle? Are there any security considerations?

On the security note, I'd also like to be able to access the database
from other machines but am unable as by default remote access to the
server isn't allowed - again, where should I be looking for information
on how to change this?

The MySQL docs are pretty daunting for a database newby, and I was
hoping there'd be some debian-specific documentation somewhere...

Thanks if anyone can point me to the relevant information source,

Martin


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 16h00   #2
David A. Parker
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

Martin Waller wrote:
> Hi,
>
> I'm using MySQL 4.1 on Etch and have a database (that I created) on
> another machine (still Sarge) that I want to transfer to the other
> before upgrading to etch on that machine also. Where should I look to
> find out how to do this? Is it just a matter of locating the database
> and copying or is it more subtle? Are there any security considerations?
>
> On the security note, I'd also like to be able to access the database
> from other machines but am unable as by default remote access to the
> server isn't allowed - again, where should I be looking for information
> on how to change this?
>
> The MySQL docs are pretty daunting for a database newby, and I was
> hoping there'd be some debian-specific documentation somewhere...
>
> Thanks if anyone can point me to the relevant information source,
>
> Martin
>
>


Martin,

Try using mysqldump to move the databases. The general syntax is
something like this:

mysqldump mydatabase > mydatabase.sql

Where "mydatabase" is the name of the database you are dumping. Note
that you may need to use the -u and/or -p options if you need to provide
a username or password.

After you have transferred this file to the other machine, create a
database on that machine with the same name, then run:

mysql mydatabase < mydatabase.sql

Again, substitute "mydatabase" for the actual database name.

I don't run MySQL from the Debian package, so I'm not sure about the
remote connection issue.

- Dave

--

Dave Parker
Utica College Department of
Integrated Information Technology Services
Data Processing Office
(315) 792-3229
Registered Linux User #408177


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 16h10   #3
Wayne Topa
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

Martin Waller(martinej.waller@ntlworld.com) is reported to have said:
> Hi,
>
> I'm using MySQL 4.1 on Etch and have a database (that I created) on another
> machine (still Sarge) that I want to transfer to the other before upgrading
> to etch on that machine also. Where should I look to find out how to do
> this? Is it just a matter of locating the database and copying or is it
> more subtle? Are there any security considerations?
>
> On the security note, I'd also like to be able to access the database from
> other machines but am unable as by default remote access to the server
> isn't allowed - again, where should I be looking for information on how to
> change this?
>
> The MySQL docs are pretty daunting for a database newby, and I was hoping
> there'd be some debian-specific documentation somewhere...


If mysql 4 came with man pages, look at man mysqldump. If not, got to
the mysql web page and download all the docs from there.

Mysqldump is used to backup your data or for copying databases to
another server. Like this

$ mysqldunp <db-name> > /backupdir/db-name.date

Look at the db-name.date file. When run on the other system you just
do
$ mysql db_name < db-name.date


I just used it, on Mysql 5 to transfer all my databases to a new
server and it's great. Just be sure no one is using the DB when you
run mysqldump.

:-) HTH, YMMV, HAND :-)

Wayne

--
Real Programmers don't write in PL/I. PL/I is for programmers who
can't decide whether to write in COBOL or FORTRAN.
__________________________________________________ _____


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 16h20   #4
Ron Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/10/07 10:00, Wayne Topa wrote:
[snip]
>
>
> I just used it, on Mysql 5 to transfer all my databases to a new
> server and it's great. Just be sure no one is using the DB when you
> run mysqldump.


Why not?

> :-) HTH, YMMV, HAND :-)


- --
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG5V7lS9HxQb37XmcRAgGwAJ0ZYpIkGnJ5EbjtpOwhWg kjVj2R4ACgmof4
6KrhyLjuoGWRHtIZdBpKnyo=
=u+1K
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 16h50   #5
Wayne Topa
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 09/10/07 10:00, Wayne Topa wrote:
> [snip]
> >
> >
> > I just used it, on Mysql 5 to transfer all my databases to a new
> > server and it's great. Just be sure no one is using the DB when you
> > run mysqldump.

>
> Why not?
>

Because my guru, Paul DuBois, said so.

WT

--
There are two ways to write error-free programs; only the third one
works.
__________________________________________________ _____


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 17h00   #6
ArcticFox
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?


On Sep 10, 2007, at 10:42 AM, Wayne Topa wrote:

> Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 09/10/07 10:00, Wayne Topa wrote:
>> [snip]
>>>
>>>
>>> I just used it, on Mysql 5 to transfer all my databases to a new
>>> server and it's great. Just be sure no one is using the DB when you
>>> run mysqldump.

>>
>> Why not?
>>

> Because my guru, Paul DuBois, said so.
>
> WT
>

And there's a chance that you'll end up with missing/corrupt or
incomplete data being moved.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 17h10   #7
Ron Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/10/07 10:42, Wayne Topa wrote:
> Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 09/10/07 10:00, Wayne Topa wrote:
>> [snip]
>>>
>>> I just used it, on Mysql 5 to transfer all my databases to a new
>>> server and it's great. Just be sure no one is using the DB when you
>>> run mysqldump.

>> Why not?
>>

> Because my guru, Paul DuBois, said so.


Appeal to authority? Shame on you!

- --
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG5WnmS9HxQb37XmcRArdPAJ4xgh1puZv/TfVXgUwxgjgtv4PVQgCfS3md
SvrOpqUpxLvDzvTv0VofvlE=
=N4AF
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 17h20   #8
Ron Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/10/07 10:50, ArcticFox wrote:
>
> On Sep 10, 2007, at 10:42 AM, Wayne Topa wrote:
>
>> Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
>>>
>>> On 09/10/07 10:00, Wayne Topa wrote:
>>> [snip]
>>>>
>>>>
>>>> I just used it, on Mysql 5 to transfer all my databases to a new
>>>> server and it's great. Just be sure no one is using the DB when you
>>>> run mysqldump.
>>>
>>> Why not?
>>>

>> Because my guru, Paul DuBois, said so.
>>
>> WT
>>

> And there's a chance that you'll end up with missing/corrupt or
> incomplete data being moved.


But isn't MySQL5 supposed to be Enterprise Ready? Any "enterprise"
RDBMS worthy of the appellation can do hot backups *and* PITR
(point-in-time recovery).

- --
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG5WtPS9HxQb37XmcRAq54AJ9sLElYdiDddl2owUicTl BAQAC/rACgwVrN
Cjdm6VKWABxZAcKx0U3Q59g=
=Ahy9
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 18h00   #9
Shams Fantar
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

Martin Waller wrote:
> Hi,
>


Hello,

> I'm using MySQL 4.1 on Etch and have a database (that I created) on
> another machine (still Sarge) that I want to transfer to the other
> before upgrading to etch on that machine also. Where should I look to
> find out how to do this? Is it just a matter of locating the database
> and copying or is it more subtle? Are there any security considerations?
>
> On the security note, I'd also like to be able to access the database
> from other machines but am unable as by default remote access to the
> server isn't allowed - again, where should I be looking for
> information on how to change this?
>
> The MySQL docs are pretty daunting for a database newby, and I was
> hoping there'd be some debian-specific documentation somewhere...
>
> Thanks if anyone can point me to the relevant information source,
>
> Martin
>
>


You can to use mysqldump[1] per example, you can read the mysql
documentation[2]. There are other ways to backup.

[1] : http://dev.mysql.com/doc/refman/4.1/en/mysqldump.html
[2] : http://dev.mysql.com/doc/refman/4.1/en/index.html

Best regards,

--
Shams Fantar (http://snurf.info)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 18h10   #10
Wayne Topa
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 09/10/07 10:50, ArcticFox wrote:
> >
> > On Sep 10, 2007, at 10:42 AM, Wayne Topa wrote:
> >
> >> Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
> >>>
> >>> On 09/10/07 10:00, Wayne Topa wrote:
> >>> [snip]
> >>>>
> >>>>
> >>>> I just used it, on Mysql 5 to transfer all my databases to a new
> >>>> server and it's great. Just be sure no one is using the DB when you
> >>>> run mysqldump.
> >>>
> >>> Why not?
> >>>
> >> Because my guru, Paul DuBois, said so.
> >>
> >> WT
> >>

> > And there's a chance that you'll end up with missing/corrupt or
> > incomplete data being moved.

>
> But isn't MySQL5 supposed to be Enterprise Ready? Any "enterprise"
> RDBMS worthy of the appellation can do hot backups *and* PITR
> (point-in-time recovery).


Yes, I think it is, but the OP said he was using 4.1 and thats what my
DuBois Mysql 4.1 book and Articfox said. It might corrupt files 'if'
there were read/writes while running mysqldump.

Wayne

--
The program is absolutely right; therefore the computer must be wrong.
__________________________________________________ _____


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 18h10   #11
Wayne Topa
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 09/10/07 10:42, Wayne Topa wrote:
> > Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> On 09/10/07 10:00, Wayne Topa wrote:
> >> [snip]
> >>>
> >>> I just used it, on Mysql 5 to transfer all my databases to a new
> >>> server and it's great. Just be sure no one is using the DB when you
> >>> run mysqldump.
> >> Why not?
> >>

> > Because my guru, Paul DuBois, said so.

>
> Appeal to authority? Shame on you!


But he has been right for soooo long now.

Wayne

--
A computer lets you make more mistakes faster than any invention in
human history - with the possible exceptions of handguns and tequila.
__________________________________________________ _____


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 21h30   #12
Ron Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/10/07 11:27, Wayne Topa wrote:
> Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 09/10/07 10:50, ArcticFox wrote:
>>> On Sep 10, 2007, at 10:42 AM, Wayne Topa wrote:
>>>
>>>> Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
>>>>> On 09/10/07 10:00, Wayne Topa wrote:
>>>>> [snip]
>>>>>>
>>>>>> I just used it, on Mysql 5 to transfer all my databases to a new
>>>>>> server and it's great. Just be sure no one is using the DB when you
>>>>>> run mysqldump.
>>>>> Why not?
>>>>>
>>>> Because my guru, Paul DuBois, said so.
>>>>
>>>> WT
>>>>
>>> And there's a chance that you'll end up with missing/corrupt or
>>> incomplete data being moved.

>> But isn't MySQL5 supposed to be Enterprise Ready? Any "enterprise"
>> RDBMS worthy of the appellation can do hot backups *and* PITR
>> (point-in-time recovery).

>
> Yes, I think it is, but the OP said he was using 4.1 and thats what my
> DuBois Mysql 4.1 book and Articfox said. It might corrupt files 'if'
> there were read/writes while running mysqldump.


Hmmm. I mentioned v5 because you said that you use it.

- --
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG5adyS9HxQb37XmcRAhQjAJ9SdSkJspdvXvbNFfSySN xW55tUhACgwK5a
dp4B2NPDGoaYJjTHVZaqKzQ=
=3NPQ
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 22h10   #13
Wayne Topa
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 09/10/07 11:27, Wayne Topa wrote:
> > Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> On 09/10/07 10:50, ArcticFox wrote:
> >>> On Sep 10, 2007, at 10:42 AM, Wayne Topa wrote:
> >>>
> >>>> Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
> >>>>> On 09/10/07 10:00, Wayne Topa wrote:
> >>>>> [snip]
> >>>>>>
> >>>>>> I just used it, on Mysql 5 to transfer all my databases to a new
> >>>>>> server and it's great. Just be sure no one is using the DB when you
> >>>>>> run mysqldump.
> >>>>> Why not?
> >>>>>
> >>>> Because my guru, Paul DuBois, said so.
> >>>>
> >>>> WT
> >>>>
> >>> And there's a chance that you'll end up with missing/corrupt or
> >>> incomplete data being moved.
> >> But isn't MySQL5 supposed to be Enterprise Ready? Any "enterprise"
> >> RDBMS worthy of the appellation can do hot backups *and* PITR
> >> (point-in-time recovery).

I took the above as an invitation to start yet another long thread
about how much better postgresql was. As I did not want to get you
started on that, again, I just ignored it. :-)

> > Yes, I think it is, but the OP said he was using 4.1 and thats what my
> > DuBois Mysql 4.1 book and Articfox said. It might corrupt files 'if'
> > there were read/writes while running mysqldump.

>
> Hmmm. I mentioned v5 because you said that you use it.


Checking my reference (you know who), I do not find the caution about
mysqldump in his books on MySQL 5.0. I have never stopped anyone from
using the server when I used mysqldump and never had a problem anyway.

Thanks for you interest though. :-)

Wayne

--
Air conditioned environment - Do NOT open Windows!
__________________________________________________ _____


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 22h20   #14
Ron Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/10/07 15:59, Wayne Topa wrote:
> Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 09/10/07 11:27, Wayne Topa wrote:
>>> Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> On 09/10/07 10:50, ArcticFox wrote:
>>>>> On Sep 10, 2007, at 10:42 AM, Wayne Topa wrote:
>>>>>
>>>>>> Ron Johnson(ron.l.johnson@cox.net) is reported to have said:
>>>>>>> On 09/10/07 10:00, Wayne Topa wrote:
>>>>>>> [snip]
>>>>>>>> I just used it, on Mysql 5 to transfer all my databases to a new
>>>>>>>> server and it's great. Just be sure no one is using the DB when you
>>>>>>>> run mysqldump.
>>>>>>> Why not?
>>>>>>>
>>>>>> Because my guru, Paul DuBois, said so.
>>>>>>
>>>>>> WT
>>>>>>
>>>>> And there's a chance that you'll end up with missing/corrupt or
>>>>> incomplete data being moved.
>>>> But isn't MySQL5 supposed to be Enterprise Ready? Any "enterprise"
>>>> RDBMS worthy of the appellation can do hot backups *and* PITR
>>>> (point-in-time recovery).

> I took the above as an invitation to start yet another long thread
> about how much better postgresql was. As I did not want to get you
> started on that, again, I just ignored it. :-)


Bashing MySQL is a pleasure all it's own.

>>> Yes, I think it is, but the OP said he was using 4.1 and thats what my
>>> DuBois Mysql 4.1 book and Articfox said. It might corrupt files 'if'
>>> there were read/writes while running mysqldump.

>> Hmmm. I mentioned v5 because you said that you use it.

>
> Checking my reference (you know who), I do not find the caution about
> mysqldump in his books on MySQL 5.0. I have never stopped anyone from
> using the server when I used mysqldump and never had a problem anyway.


Good to know.

> Thanks for you interest though. :-)




- --
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG5bNyS9HxQb37XmcRAkuBAKDMRTiJizQe55SAJa5ucT eyeXCzTwCcDy3T
lZzWMjIRSPZgtbiXA23WgSU=
=ncQM
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/09/2007, 22h40   #15
Joe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

Martin Waller wrote:
> Hi,
>
> I'm using MySQL 4.1 on Etch and have a database (that I created) on
> another machine (still Sarge) that I want to transfer to the other
> before upgrading to etch on that machine also. Where should I look to
> find out how to do this? Is it just a matter of locating the database
> and copying or is it more subtle? Are there any security considerations?
>
> On the security note, I'd also like to be able to access the database
> from other machines but am unable as by default remote access to the
> server isn't allowed - again, where should I be looking for information
> on how to change this?
>
> The MySQL docs are pretty daunting for a database newby, and I was
> hoping there'd be some debian-specific documentation somewhere...
>
> Thanks if anyone can point me to the relevant information source,
>


You haven't mentioned it, but are you using phpmyadmin? If so, exports
and imports are fairly painless. I find it easier than the command line,
but I'm using apache and php anyway. It's also handy for hacking back
the mistakes that your access software has added...

From version 4 (sarge) /etc/mysql/my.cnf:

bind-address = <IP address of relevant NIC>

and a restart will get it listening.

Apart from the debian-sys-maint user, there doesn't seem to be much
localisation of mysql. The standard docs should be OK. There really
isn't a whole lot to it, apart from the privilege system. phpmyadmin
really s there. The worst danger is of permanently locking yourself
out before you've got the hang of it, at which point you reinstall.
Don't commit priceless data to it until you understand the privileges.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 11/09/2007, 04h00   #16
Mihira Fernando
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

David A. Parker wrote:
> Martin Waller wrote:
>> Hi,
>>
>> I'm using MySQL 4.1 on Etch and have a database (that I created) on
>> another machine (still Sarge) that I want to transfer to the other
>> before upgrading to etch on that machine also. Where should I look to
>> find out how to do this? Is it just a matter of locating the database
>> and copying or is it more subtle? Are there any security considerations?
>>
>> On the security note, I'd also like to be able to access the database
>> from other machines but am unable as by default remote access to the
>> server isn't allowed - again, where should I be looking for
>> information on how to change this?
>>
>> The MySQL docs are pretty daunting for a database newby, and I was
>> hoping there'd be some debian-specific documentation somewhere...
>>
>> Thanks if anyone can point me to the relevant information source,
>>
>> Martin
>>
>>

>
> Martin,
>
> Try using mysqldump to move the databases. The general syntax is
> something like this:
>
> mysqldump mydatabase > mydatabase.sql
>
> Where "mydatabase" is the name of the database you are dumping. Note
> that you may need to use the -u and/or -p options if you need to provide
> a username or password.
>
> After you have transferred this file to the other machine, create a
> database on that machine with the same name, then run:
>
> mysql mydatabase < mydatabase.sql
>
> Again, substitute "mydatabase" for the actual database name.
>
> I don't run MySQL from the Debian package, so I'm not sure about the
> remote connection issue.


By default, MySQL on Debian is listening only on localhost and remote access is
disabled.

in /etc/mysql/my.cnf

Comment out the following lines :
bind-address = 127.0.0.1
skip-networking

and restart MySQL.

Mihira.
--
Random Quotes From Megas XLR
Coop: You see? The mysteries of the Universe are revealed when you break stuff.
Jamie: When in doubt, blow up a planet.
Kiva: It's an 80 foot robot, if we can't see it, absolutely it's not here.
Glorft Technician: Unnecessary use of force in capturing the Earthers has been
approved.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 11/09/2007, 09h00   #17
Martin Waller
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Moving MySQL database from one machine to another and remotely accessing dbs?

Many thanks to all who replied.

Martin

Martin Waller wrote:
> Hi,
>
> I'm using MySQL 4.1 on Etch and have a database (that I created) on
> another machine (still Sarge) that I want to transfer to the other
> before upgrading to etch on that machine also. Where should I look to
> find out how to do this? Is it just a matter of locating the database
> and copying or is it more subtle? Are there any security considerations?
>
> On the security note, I'd also like to be able to access the database
> from other machines but am unable as by default remote access to the
> server isn't allowed - again, where should I be looking for
> information on how to change this?
>
> The MySQL docs are pretty daunting for a database newby, and I was
> hoping there'd be some debian-specific documentation somewhere...
>
> Thanks if anyone can point me to the relevant information source,
>
> Martin
>
>



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h08.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,35160 seconds with 25 queries