Hello,
I've been working on my design for managing slave replication and I've
run into a problem.
To explain, slave replication works in a way, that it loads master log
(located on master server), where information about transactions are
stored. Everything is fine, if you are setting up replication on empty
server. However, once you have some data on master, you have to copy
them to slave server before slave replication is started. My original
idea was to use LOAD DATA FROM MASTER, but this feature is no longer
supported
(http://dev.mysql.com/doc/refman/5.0/en/load-data-from-master.html). One
of my ideas is to create some sort of export/import function for copying
data from master to slave with phpMyAdmin. Another possibility (for
large databases/tables) is to ask root (=user) to do it manually (with
mysqldump+mysql client).
If anyone has any better idea how to solve this problem, please let me know.
Thank you.
Tomas
Hello everyone,
I have a couple matters that I wanted to get input from you all on.
First, possibilities for the new import interface. For those who don't
know much about my GSoC project, one of the goals was to create an
intermediary interface for editing the structure of a new
database/table set that was deduced from some import data. Via this
interface the structure is to be altered and changed as necessary
(dropping tables, changes keys, etc.) and once the user is satisfied,
it is created and the data (now adapted to the new structure) in
inserted. This involved storing all the data from the import in a PHP
session so the source wouldn't have to be reanalyzed after the user
made edits to the structure. I have been having some second thoughts
regarding such an interface. Depending on the size of the import, the
PHP session could take up a considerable amount of memory. Also, all
database and table options are editable after creation via the current
regular db/table interface, therefore I believe the intermediary
interface would be redundant at best, and counterintuitive as worst.
All the while being rather inefficient. I find that directing the user
towards the newly created database and/or tables via a notification
after a successful import is simple, effective, and vastly more
efficient.
Suggestions, thought, comments, concerns, anyone?
Second, I would like to propose a new XML export format to better
support my new import features. This new format will present the
option to export the SQL creation code for each of the exported tables
in the manner outlined below:
<?xml version="1.0" encoding="utf-8" ?>
<!--
-
- phpMyAdmin XML Dump
- ... etc. etc. etc.
-->
<pma_xml_export version="1.0"
xmlns:pma="http://www.phpmyadmin.net/some_doc_url/">
<pma:structure>
<pma:db_name>
<pma:tbl_name_1>CREATE TABLE `tbl_name_1`...</pma:tbl_name_1>
<pma:tbl_name_2>CREATE TABLE `tbl_name_2`...</pma:tbl_name_2>
<pma:tbl_name_3>CREATE TABLE `tbl_name_3`...</pma:tbl_name_3>
</pma:db_name>
</pma:structure>
<db_name>
<tbl_name_1>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_1>
<tbl_name_2>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_2>
<tbl_name_3>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_3>
</db_name>
</pma_xml_export>
...as opposed to the existing format:
<?xml version="1.0" encoding="utf-8" ?>
<!--
-
- phpMyAdmin XML Dump
- ... etc. etc. etc.
-->
<db_name>
<tbl_name_1>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_1>
<tbl_name_2>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_2>
<tbl_name_3>
<col_1>data</col_1>
<col_2>data</col_2>
<col_3>data</col_3>
</tbl_name_3>
</db_name>
If you have any advice, I would love to hear from you.
Thanks for your time and advice,
Derek Schaefer
Hi,
Could any one suggest, whether :
Should I ask the user "Do you want to delete the uncommon tables or uncommon
rows from the target database/table? " by prompting a message box or dialog
box
OR
Should I make my own assumption that there is no need to delete any previous
data in the target database.
Regards,
Zahra
Hi
First I think that phpmyadmin-devel is the right list for this question.
Dne Tue, 23 Jun 2009 02:37:09 +0500
Zahra Naeem <xara.fast(a)gmail.com> napsal(a):
> Hope all of you are doing great and having fun at GSoC.
>
> Hey guys! could anyone help me out with this problem.
>
> Whenever I try to retrieve data from a "form" using $_REQUEST or $_POST
> variables when I am also including certain files at the top of the page
> using require_once function call, it cannot not find any values in the
> $_REQUEST or $_POST variables.
>
> Whereas, if I first retrieve the same values using the $_REQUEST or $_POST
> variables and then include all the files using require_once function, it
> finds values in $_REQUEST or $_POST variables.
>
> My problem is that I have to include those files before I retrieve data from
> the "form" using these variables.
>
> I have tried to retreive data and save it in simple php variables before
> including the files. But those variable show values before the require_once
> function but do not show any value after the code lines that call the
> function require_once().
>
> This is pretty strange but I hope any one of you would be able to suggest
> some appropriate solution for my problem.
It looks like you do not propagate token over your form, what leads to
removal of all non whitelisted variables from request. Use one of
functions in libraries/url_generating.lib.php to include token and
other common magic in your form.
--
Michal Čihař | http://cihar.com | http://blog.cihar.com
The 2009 SourceForge.net Community Choice Awards program has announced
that phpMyAdmin is finalist for "Best Tool or Utility for SysAdmins" and
"Best Tool or Utility for Developers". This is great news but it's up to
all users to vote for us (you have until July 20 but hey -- now is the
perfect time to vote!).
Please visit http://sourceforge.net/community/cca09/vote/.
---
Marc Delisle
http://infomarc.info
Hi,
I had a quick look at Derek's current state of XML import plug-in which
tries to detect column types based on values.
I think that the original problem about this, is that phpMyAdmin's XML
export does not have the option of exporting structure, data or both.
I'm not sure how people are currently importing phpMyAdmin's XML output
but I believe we could change the export format to handle our importing
needs.
--
Marc Delisle
http://infomarc.info
Hi all,
For a personal project I need to create foreign keys between different
databases. I've realised that phpmyadmin only allows foreign keys on the
same db so I'm thinking on develop this feature.
I know it's not a very good practice to create foreign keys on different
databases... but I need it anyway...
Any comments or guidelines to do it?
Thanks,
Isart