Revisión 471
Añadido por Francisco Mora hace más de 12 años
abiesweb/LEEME.txt | ||
---|---|---|
"""
|
||
Abiesweb - Consultas simples catálogo de abies
|
||
Copyright (C) 2012 Francisco Mora <francisco.mora.sanchez@gmail.com>
|
||
|
||
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
|
||
|
||
"""
|
||
|
||
Esto es una pequeña utilidad que hice hace tiempo para poder consultar a través de una aplicación web desarrollada con web2py, el catálogo de
|
||
nuestra biblioteca abies. Es muy primitiva, ya que fue cuando comencé con web2py, pero creo que útil quizá para algunos. Los pasos para
|
||
instalarla son los que describo a continuación. Debemos tener los siguientes archivos, es importante que los scripts mdb2tool y
|
||
abies.sh tengan permisos de ejecución:
|
||
|
||
. abies.mdb -> evidentemente los datos del programa abies
|
||
. abies.sh -> script que procesa el mdb e incorpora los datos en mysql
|
||
. mdb2mysql -> script perl que genera el SQL desde el MDB
|
||
. abiesweb.tar.gz -> aplicación web2py abiesweb
|
||
. web2pyapache -> configuración apache web2py
|
||
|
||
PASOS:
|
||
|
||
1. Debemos crear en nuestro servidor mysql, bien desde la consola mysql o bien desde phpmyadmin,
|
||
una base de datos con las siguientes características:
|
||
|
||
nombre: abies
|
||
codificación: UTF-8 España
|
||
|
||
|
||
2. Creación de un usuario con nombre "abies", sin contraseña y permiso de lectura/escritura en esta base de datos.
|
||
|
||
3. Cada cierto periodo de tiempo procederemos a importar los datos a esta base de datos desde el fichero "abies.mdb"
|
||
de la aplicación abies. Así tendremos actualizada la base de datos hasta el momento en que lo realizamos. Este proceso es el que
|
||
hay que realizar de forma periódica. Es necesario que donde ejecutemos el script tengamos instalado los paquetes debian
|
||
"mdbtools" y "mysql-client", además de y en la misma carpeta esté el archivo abies.mdb. Este script exporta la base de datos de access de abies a un
|
||
formato SQL que entiende mysql e importa a mysql esos datos. Ejecutaremos la orden:
|
||
|
||
./abies.sh
|
||
|
||
Podemos ver la base de datos con phpmyadmin.
|
||
|
||
Hemos de tener en cuenta que si el proceso lo realizamos en una máquina que no es la que tiene el servidor mysql, hemos de
|
||
configurar el servidor mysql para que acepte peticiones que provengan de máquinas que no sean ella misma, esto se hace editando
|
||
el fichero "/etc/mysql/my.cnf", del ordenador con el servidor mysql, comentando la línea:
|
||
|
||
#bind-address = 127.0.0.1
|
||
|
||
Para permitir conexiones de otras máquinas clientes. Una vez hecho esto reiniciamos el servicio mysql para que tome la nueva
|
||
configuración.
|
||
|
||
4. Lo siguiente consiste en descargar el web2py de la página del proyecto: "http://www.web2py.com/examples/static/web2py_src.zip".
|
||
Descomprimimos este archivo en una carpeta del servidor mysql, por ejemplo "/var/www/web2py". Para arrancar el framework:
|
||
|
||
unzip web2py_src.zip
|
||
chown -R www-data:www-data web2py
|
||
cd /var/www/web2py
|
||
|
||
5. Ahora debemos instalar la aplicación abiesweb. Para ello, y siguiendo con la secuencia anterior:
|
||
|
||
cd /var/www/web2py/applications
|
||
tar xvzf dondetenemosabiesweb.tar.gz .
|
||
|
||
Descomprimimos el archivo abiesweb.tar.gz en esa ruta y se habrá creado la carpeta abiesweb
|
||
|
||
6. Para arrancar web2py, con el servidor web que lleva integrado (modo "lento"), lento si el número de peticiones es elevado,
|
||
realizaremos lo siguiente:
|
||
|
||
cd /var/www/web2py
|
||
python web2py.py -a "passwordquequeramosparaadministracion" &
|
||
|
||
Este comando arrancará un proceso web en el puerto 8000.
|
||
|
||
7. Ya podremos probar si todo ha ido bien. Para ello abriremos un navegador web e iremos a la siguiente página:
|
||
|
||
http://nombremaquina:8000/abiesweb
|
||
|
||
Donde nombremaquina tiene que ser sustituido por el nombre de la máquina en que hemos descargado web2py. Una vez aquí podremos buscar
|
||
por título, autor/a, editorial. La caja de texto espera a teclear al menos 4 caracteres y una vez tecleados realiza búsquedas a la base
|
||
de datos apareciendo debajo de la caja de texto el resultado. Cuando pinchamos en un libro nos aparece una pequeña ficha de información,
|
||
que incluye los ejemplares existentes, localización, etc. Además podremos acceder desde aquí a los títulos de la editorial o bien a las
|
||
obras de algún autor/a.
|
||
|
||
El proceso web2py se ha quedado funcionando en segundo plano. Si reiniciamos la máquina tendremos que volver a iniciarlo manualmente.
|
||
|
||
8. (Recomendado) Si queremos mayor velocidad de proceso, la forma que voy a describir hace que sea apache quien sirve la aplicación o aplicaciones que estén metidas
|
||
en web2py. Tendremos que utilizar la extensión WSGI de apache, para que éste procese las peticiones y no el servidor web integrado de web2py, para ello hay que
|
||
hacer varias modificaciones, evidentemente hay que tener instalado apache2 y libapache2-mod-wsgi.
|
||
|
||
Ya no es necesario arrancar el proceso web2py (punto 6), si lo está deberemos hacer un kill al proceso para eliminarlo, ya que sino apache se
|
||
quejará de que hay otro proceso sirviendo en el puerto 8000. Este puerto puede cambiarse sin problema.
|
||
|
||
Copiaremos en /etc/apache2/sites-available el fichero "web2pyapache" y activaremos el sitio:
|
||
|
||
cp dondetenemosweb2pyapache /etc/apache2/sites-available
|
||
a2ensite web2pyapache
|
||
service apache2 restart
|
||
|
||
Si todo ha ido bien visitando el enlace del punto 7, podremos acceder a la misma aplicación pero siendo apache quien la sirve.
|
||
|
||
|
||
|
abiesweb/mdb2mysql | ||
---|---|---|
#!/usr/bin/perl
|
||
##########
|
||
#
|
||
# File: mdb2mysql
|
||
#
|
||
# Created By: Bill Lewis (bill@enobis.com)
|
||
# Created On: Aug 5, 2004
|
||
#
|
||
# Description: Perl script to convert MS Access (mdb) files to an import
|
||
# schema suitable for MySQL.
|
||
#
|
||
# Requirements: Perl (obvioulsy)
|
||
# mdbtools (mdbtools.sourceforge.net)
|
||
#
|
||
# This is free software; you can redistribute it and/or modify it under
|
||
# the terms of the GNU General Public License as published by the Free
|
||
# Software Foundation. You should have received a copy of the GNU
|
||
# General Public License along with this software; if not, visit:
|
||
# http://www.gnu.org/copyleft/gpl.html
|
||
#
|
||
# Revision History:
|
||
#
|
||
# v1.0 - First version released for use on Oct 14, 2004
|
||
#
|
||
#############################################################################
|
||
use strict;
|
||
use Getopt::Std;
|
||
|
||
my $VERSION = "MDB2MySQL v1.0";
|
||
my $BASEDATOS = "USE abies;";
|
||
|
||
##########
|
||
#
|
||
# Initialize Execution Environment
|
||
#
|
||
#############################################################################
|
||
our %opts;
|
||
|
||
# Set defaults...
|
||
$opts{"r"} = "_";
|
||
$opts{"U"} = "blob";
|
||
$Getopt::Std::STANDARD_HELP_VERSION=1;
|
||
|
||
getopts('cdeilhsuxMVo:r:t:U:',\%opts);
|
||
|
||
if($opts{"h"}) { &VERSION_MESSAGE; &HELP_MESSAGE; exit; }
|
||
if($opts{"V"}) { &VERSION_MESSAGE; exit; }
|
||
|
||
if(@ARGV < 1) { &VERSION_MESSAGE; &HELP_MESSAGE; exit; }
|
||
my $dataFile = $ARGV[$#ARGV];
|
||
|
||
if($opts{"x"})
|
||
{
|
||
$opts{"d"} = 1;
|
||
$opts{"e"} = 1;
|
||
$opts{"l"} = 1;
|
||
}
|
||
|
||
my $delim = "__zz__";
|
||
|
||
my %mdbversions = ( "JET3" => "Access 97", "JET4" => "Access 2000/XP" );
|
||
|
||
##########
|
||
#
|
||
# MDB2MySQL Header Information
|
||
#
|
||
#############################################################################
|
||
|
||
# Get MDB File Version
|
||
open(VER,"mdb-ver $dataFile|") || die "Error Reading MDB File: $!\n";
|
||
my $dataFileVersion = <VER>;
|
||
close(VER);
|
||
chop $dataFileVersion;
|
||
$dataFileVersion .= " (".$mdbversions{$dataFileVersion}.")";
|
||
|
||
# Print Header Information
|
||
|
||
print $BASEDATOS;
|
||
print "\n\n";
|
||
|
||
##########
|
||
#
|
||
# Script body
|
||
#
|
||
#############################################################################
|
||
|
||
# Get List of Tables
|
||
my @tables;
|
||
my $mdbtables = "mdb-tables -d".$delim;
|
||
if($opts{"M"}) { $mdbtables .= " -S"; }
|
||
|
||
if($opts{"t"})
|
||
{
|
||
@tables = split(/,/,$opts{"t"});
|
||
}
|
||
else
|
||
{
|
||
open(TABLES,"$mdbtables $dataFile|") || die "Error Reading Tables: $!\n";
|
||
if(!$opts{"M"})
|
||
{
|
||
$_ = <TABLES>;
|
||
chop;
|
||
@tables = split(/$delim/);
|
||
}
|
||
else
|
||
{
|
||
while(<TABLES>)
|
||
{
|
||
chop;
|
||
push(@tables,$_);
|
||
}
|
||
}
|
||
close(TABLES);
|
||
if($opts{"o"})
|
||
{
|
||
my %hash = ();
|
||
foreach (@tables,split(/,/,$opts{"o"})) { $hash{$_}++; }
|
||
@tables = ();
|
||
foreach (keys %hash) { if($hash{$_} == 1) { push(@tables,$_); } }
|
||
}
|
||
}
|
||
|
||
# Loop through the tables to build the MySQL import/SQL format
|
||
my @headers;
|
||
my ($tbl,$record,$firstrecord,$first,$multirow,$startmulti,$endmulti,$values);
|
||
my $mdbexport = "mdb-export -d".$delim." %s %s|";
|
||
foreach $tbl (@tables)
|
||
{
|
||
if(!$opts{"i"}) { &createTableSchema($dataFile,$tbl); }
|
||
|
||
if($opts{"c"}) { next; }
|
||
|
||
next if ($tbl eq 'Politica');
|
||
|
||
print "--\n-- Dumping data for table \'$tbl\'\n--\n\n";
|
||
|
||
# Get Table Data Records
|
||
open(RECORDS,sprintf($mdbexport,$dataFile,$tbl)) ||
|
||
die "Error Exporting Record Data: $!\n";
|
||
|
||
# Get Headers in case of future development/features...
|
||
foreach (split(/$delim/,<RECORDS>))
|
||
{
|
||
s/[^a-zA-Z0-9_\$]/$opts{"r"}/g;
|
||
push(@headers,$_);
|
||
}
|
||
|
||
$firstrecord = 1;
|
||
$multirow = $startmulti = $endmulti = 0;
|
||
if($opts{"l"}) { print "LOCK TABLES $tbl WRITE;\n"; }
|
||
if($opts{"e"}) { print "INSERT INTO $tbl VALUES "; }
|
||
while(<RECORDS>)
|
||
{
|
||
if(!$multirow)
|
||
{
|
||
chop;
|
||
$first = 1;
|
||
$values = "";
|
||
}
|
||
foreach (split(/$delim/))
|
||
{
|
||
if(!$multirow)
|
||
{
|
||
# Strip Quotes from both sides of data value
|
||
if(substr($_,0,1) eq '"' && substr($_,-1,1) eq '"')
|
||
{
|
||
$_ = substr($_,1,$#_);
|
||
}
|
||
# Strip out quotes from both sides on an unchoped row resulting
|
||
# from a multirow data record.
|
||
elsif(substr($_,0,1) eq '"' && substr($_,-2,1) eq '"')
|
||
{
|
||
$_ = substr($_,1,$#_-1);
|
||
}
|
||
# Check to see if this data value is the start of a multirow
|
||
elsif(substr($_,0,1) eq '"')
|
||
{
|
||
$_ = substr($_,1);
|
||
$multirow = 1;
|
||
$startmulti = 1;
|
||
}
|
||
}
|
||
else
|
||
{
|
||
# Check to see if this data is the end of a multirow
|
||
# Start by verifying that a quotation mark at the end of the
|
||
# line is not part of the data...
|
||
if(substr($_,-2) ne '""' || substr($_,-3,2) ne '""')
|
||
{
|
||
if(substr($_,-1,1) eq '"')
|
||
{
|
||
$_ = substr($_,0,$#_);
|
||
$multirow = 0;
|
||
$endmulti = 1;
|
||
}
|
||
elsif(substr($_,-2,1) eq '"')
|
||
{
|
||
$_ = substr($_,0,$#_-1);
|
||
$multirow = 0;
|
||
$endmulti = 1;
|
||
}
|
||
}
|
||
}
|
||
|
||
# Need to check if the field is a date type
|
||
# and convert to acceptable MySQL format if so...
|
||
if(!$multirow && !$endmulti)
|
||
{
|
||
if(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})/ ||
|
||
/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})/)
|
||
{
|
||
$_ = sprintf("%s%02s%02s%02s%02s%02s",$3,$1,$2,$4,$5,$6);
|
||
}
|
||
}
|
||
|
||
# Escape and convert certain characters for MySQL format
|
||
s/\\/\\\\/g;
|
||
s/'/\\'/g;
|
||
s/""/"/g;
|
||
s/"/\\"/g;
|
||
|
||
# Create MySQL format for dump values
|
||
if(!$multirow)
|
||
{
|
||
if(!$first && !$endmulti) { $values .= ","; }
|
||
|
||
if(!$endmulti) { $values .= "'".$_."'"; }
|
||
else { $values .= $_."'"; $endmulti = 0; }
|
||
}
|
||
else
|
||
{
|
||
if($startmulti)
|
||
{
|
||
if(!$first) { $values .= ","; }
|
||
$values .= "'".$_;
|
||
$startmulti = 0;
|
||
}
|
||
else
|
||
{
|
||
$values .= $_;
|
||
}
|
||
}
|
||
|
||
$first = 0;
|
||
}
|
||
if(!$multirow)
|
||
{
|
||
if($opts{"e"})
|
||
{
|
||
if(!$firstrecord) { print ","; }
|
||
print "($values)";
|
||
$firstrecord = 0;
|
||
}
|
||
else
|
||
{
|
||
printf("INSERT INTO %s VALUES (%s);\n",$tbl,$values);
|
||
}
|
||
}
|
||
}
|
||
if($opts{"e"}) { print ";\n"; }
|
||
if($opts{"l"}) { print "UNLOCK TABLES;\n\n"; }
|
||
|
||
close(RECORDS);
|
||
}
|
||
|
||
exit;
|
||
|
||
##########
|
||
#
|
||
# Subroutine: createTableSchema
|
||
#
|
||
# Description: Creates the table structure in MySQL format.
|
||
#
|
||
# Arguments: $mdbFile - MDB Database file containing table
|
||
# $table - the MDB Database table
|
||
#
|
||
# Return: void
|
||
#
|
||
#############################################################################
|
||
|
||
sub createTableSchema
|
||
{
|
||
my ($colsDefinition);
|
||
my ($mdbFile,$table) = @_;
|
||
my $mdbschema = "echo \"DESCRIBE TABLE \"".$table." | mdb-sql ".$mdbFile;
|
||
|
||
# Get Table Schema for the given table
|
||
open(SCHEMA,"$mdbschema|") || die "Error Reading Table Schema: $!\n";
|
||
while(<SCHEMA>)
|
||
{
|
||
chop;
|
||
s/\s+//g;
|
||
if(/^\|(\S+)\|(\S+)\|(\d+)\|/)
|
||
{
|
||
$colsDefinition .= &convertColumnType($1,$2,$3);
|
||
}
|
||
}
|
||
close(SCHEMA);
|
||
chop $colsDefinition;
|
||
chop $colsDefinition;
|
||
|
||
print "--\n-- Table structure for table \'$table\'\n--\n\n";
|
||
if($opts{"d"}) { print "DROP TABLE IF EXISTS $table;\n"; }
|
||
print "CREATE TABLE $table (\n";
|
||
print $colsDefinition, "\n";
|
||
print ");\n\n";
|
||
}
|
||
|
||
##########
|
||
#
|
||
# Subroutine: convertColumnType
|
||
#
|
||
# Description: Converts the MDB (MS Access) column data type to the
|
||
# corresponding MySQL data type and creates the column
|
||
# structure.
|
||
#
|
||
# Arguments: $field - MDB Database column/field name
|
||
# $type - MDB Database data type
|
||
# $size - MDB data type size
|
||
#
|
||
# Return: The schema for the converted column data type.
|
||
#
|
||
#############################################################################
|
||
|
||
sub convertColumnType
|
||
{
|
||
my $def;
|
||
my ($field,$type,$size) = @_;
|
||
|
||
$field =~ s/[^a-zA-Z0-9_\$]/$opts{"r"}/g;
|
||
|
||
$def = " ";
|
||
if($type eq "Text")
|
||
{
|
||
if($size > 2)
|
||
{
|
||
$def .= sprintf("%s varchar(%d) NOT NULL default '',\n",$field,$size);
|
||
}
|
||
else
|
||
{
|
||
$def .= sprintf("%s char(%d) NOT NULL default '',\n",$field,$size);
|
||
}
|
||
}
|
||
elsif($type eq "Memo/Hyperlink")
|
||
{
|
||
$def .= sprintf("%s text NOT NULL default '',\n",$field);
|
||
}
|
||
elsif($type eq "Byte")
|
||
{
|
||
$def .= sprintf("%s tinyint NOT NULL default 0,\n",$field);
|
||
}
|
||
elsif($type eq "Integer")
|
||
{
|
||
$def .= sprintf("%s smallint NOT NULL default 0,\n",$field);
|
||
}
|
||
elsif($type eq "LongInteger")
|
||
{
|
||
$def .= sprintf("%s int NOT NULL default 0,\n",$field);
|
||
}
|
||
elsif($type eq "Single" || $type eq "Double")
|
||
{
|
||
$def .= sprintf("%s double NOT NULL default 0,\n",$field);
|
||
}
|
||
elsif($type eq "Numeric")
|
||
{
|
||
$def .= sprintf("%s float NOT NULL default 0,\n",$field);
|
||
}
|
||
elsif($type eq "Currency")
|
||
{
|
||
$def .= sprintf("%s decimal(10,2) NOT NULL default '0.00',\n",$field);
|
||
}
|
||
elsif($type eq "DateTime" || $type eq "DateTime(Short)")
|
||
{
|
||
$def .= sprintf("%s datetime NOT NULL default '0000-00-00 00:00:00',\n",
|
||
$field);
|
||
}
|
||
elsif($type eq "Boolean" || $type eq "Bit")
|
||
{
|
||
$def .= sprintf("%s enum('1','0') NOT NULL default '1',\n",$field);
|
||
}
|
||
elsif($type eq "ReplicationID")
|
||
{
|
||
$def .= sprintf("%s tinyblob NOT NULL default '',\n",$field);
|
||
}
|
||
elsif($type eq "OLE")
|
||
{
|
||
$def .= sprintf("%s longblob NOT NULL default '',\n",$field);
|
||
}
|
||
else
|
||
{
|
||
if($opts{"u"})
|
||
{
|
||
print "??? Unknown Access/MDB Field Data Type!\n";
|
||
print "??? Field: $field\n";
|
||
print "??? Data Type: $type($size)\n";
|
||
print "??? Resolution Options:\n";
|
||
print "??? 1. Change the field to a known data type within Access\n";
|
||
print "??? 2. Let MDB2MySQL use a known MySQL data type instead.\n";
|
||
print "??? The default replacement is a 'blob' but can be\n";
|
||
print "??? changed using the -U flag.\n";
|
||
exit;
|
||
}
|
||
else
|
||
{
|
||
$def .= sprintf("%s %s NOT NULL default '',\n",$field,$opts{"U"});
|
||
}
|
||
}
|
||
|
||
return $def;
|
||
}
|
||
|
||
##########
|
||
#
|
||
# Subroutine: VERSION_MESSAGE
|
||
#
|
||
# Description: Displays the version message. Complies to the Getopts
|
||
# perl module.
|
||
#
|
||
# Arguments: none
|
||
#
|
||
# Return: void
|
||
#
|
||
#############################################################################
|
||
|
||
sub VERSION_MESSAGE()
|
||
{
|
||
print $VERSION, "\n";
|
||
print "Created By: Bill Lewis (bill\@enobis.com)\n";
|
||
print "GNU General Public License (http://www.gnu.org/copyleft/gpl.html)\n";
|
||
}
|
||
|
||
##########
|
||
#
|
||
# Subroutine: HELP_MESSAGE
|
||
#
|
||
# Description: Displays the help message. Complies to the Getopts
|
||
# perl module.
|
||
#
|
||
# Arguments: none
|
||
#
|
||
# Return: void
|
||
#
|
||
#############################################################################
|
||
|
||
sub HELP_MESSAGE()
|
||
{
|
||
print "\nUsage: mdb2mysql [options] <mdb file>\n";
|
||
print " -c Create table structure only, no data.\n";
|
||
print " -d Add a 'drop table' before each create.\n";
|
||
print " -e Use the much faster, extended INSERT syntax.\n";
|
||
print " -i Export data inserts only.\n";
|
||
print " -l Add locks around insert statements.\n";
|
||
print " -o <tables> Omit tables in this comma seperated list.\n";
|
||
print " -r <character> Replace illegal characters with given character.\n";
|
||
print " The default character is an underscore.\n";
|
||
print " -t <tables> Export only this list of comma seperated tables.\n";
|
||
print " -u Report unknown Access data type and exit.\n";
|
||
print " -x Same as using -d -e -l combined options.\n";
|
||
#print " -M Convert Access System tables ('MSys') as well.\n";
|
||
print " -U <type> Use the MySQL data type for unknown Access types.\n";
|
||
print " Unless given, 'blob' will be used by default.\n";
|
||
print " -h, --help This message and exit.\n";
|
||
print " -V, --version Output version information and exit.\n";
|
||
}
|
||
abiesweb/web2pyapache | ||
---|---|---|
NameVirtualHost *:8000
|
||
|
||
WSGIRestrictStdout Off
|
||
|
||
<VirtualHost *:8000>
|
||
WSGIDaemonProcess web2py user=www-data group=www-data
|
||
WSGIProcessGroup web2py
|
||
WSGIScriptAlias / /var/www/web2py/wsgihandler.py
|
||
|
||
<Directory /var/www/web2py>
|
||
AllowOverride None
|
||
Order Allow,Deny
|
||
Deny from all
|
||
<Files wsgihandler.py>
|
||
Allow from all
|
||
</Files>
|
||
</Directory>
|
||
|
||
AliasMatch ^/abiesweb/([^/]+)/static/(.*) \
|
||
/var/www/web2py/applications/$1/static/$2
|
||
<Directory /var/www/web2py/applications/*/static/>
|
||
Order Allow,Deny
|
||
Allow from all
|
||
</Directory>
|
||
|
||
AliasMatch ^/gesiesweb/([^/]+)/static/(.*) \
|
||
/var/www/web2py/applications/$1/static/$2
|
||
<Directory /var/www/web2py/applications/*/static/>
|
||
Order Allow,Deny
|
||
Allow from all
|
||
</Directory>
|
||
|
||
AliasMatch ^/([^/]+)/static/(.*) \
|
||
/var/www/web2py/applications/$1/static/$2
|
||
<Directory /var/www/web2py/applications/*/static/>
|
||
Order Allow,Deny
|
||
Allow from all
|
||
</Directory>
|
||
|
||
<Location /admin>
|
||
Deny from all
|
||
</Location>
|
||
|
||
<LocationMatch ^/([^/]+)/appadmin>
|
||
Deny from all
|
||
</LocationMatch>
|
||
|
||
</VirtualHost>
|
||
|
abiesweb/abies.sh | ||
---|---|---|
#!/bin/sh
|
||
#exportamos a sql de mysql
|
||
./mdb2mysql -d abies.mdb > abies.sql
|
||
#importamos a mysql
|
||
mysql -h mysql --default_character_set utf8 -u abies --password=abies < abies.sql
|
||
Exportar a: Unified diff
Subiendo abiesweb