1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
<?xml version="1.0" encoding="UTF-8"?>
<refentry version="5.0-subset Scilab" xml:id="how_to_start" xml:lang="en"
xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:ns3="http://www.w3.org/1999/xhtml"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:db="http://docbook.org/ns/docbook">
<info>
<pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (mer., 26 mars 2008)
$</pubdate>
</info>
<refnamediv>
<refname>How to start</refname>
<refpurpose>The first steps</refpurpose>
</refnamediv>
<refsection>
<title>How to start - Linux version</title>
<para>First, you will need to start the mysql server.</para>
<para>Under linux, as a root user, you will need to install
serveral packages</para>
<itemizedlist>
<listitem><para>mysql</para></listitem>
<listitem><para>libmysql-devel</para></listitem>
<listitem><para>libmysql16</para></listitem>
<listitem><para>mysql-client</para></listitem>
<listitem><para>mysql-common</para></listitem>
<listitem><para>mysql-common-core</para></listitem>
<listitem><para>mysql-core</para></listitem>
</itemizedlist>
<para>Once this is done, you need to start the mysql server:</para>
<programlisting role="example"><![CDATA[
# as a root user
/etc/init.d/mysqld start
]]></programlisting>
<para>Still as a root user, add a mysql user</para>
<programlisting role="example"><![CDATA[
# start mysql
mysql
# and issue the following command to create the user 'myusername'
# don't forget to replace 'myusername' by your username
CREATE USER 'myusername'@'localhost' IDENTIFIED BY 'mypassword'; GRANT
ALL PRIVILEGES ON *.* TO 'myusername'@'localhost' WITH GRANT OPTION;
QUIT
]]></programlisting>
<para>You can go back to normal user.</para>
<para>We now create and fill a database with the sudoku and
transp data.</para>
<para>We also create a temporary 'glpk' username with a 'gnu' password.</para>
<programlisting role="example"><![CDATA[
# Don't forget to replace myusername by YOUR username.
# You can launch the initialization script
./mysql_setup.sh myusername
# Or you can issue the mysql commands manually.
cd mysql/demos/
mysql -f -u myusername -p < scripts/sudoku.sql
mysql -f -u myusername -p < scripts/transp.sql
]]></programlisting>
<para>Now, you are ready to launch the demo file:</para>
<programlisting role="example"><![CDATA[
scilab
// In Scilab, in the mysql directory, build the toolbox (once).
exec builder.sce;
// Load the toolbox (each time you need to use the mysql toolbox).
exec loader.sce;
// go into the demo directory
cd demos
// and launch the demo
exec sql.sce;
]]></programlisting>
<para>Once tested, you can clean your database:</para>
<programlisting role="example"><![CDATA[
# Don't forget to replace myusername by YOUR username.
# Go into the demo directory. Here, you can launch the cleaning script
./mysql_clean.sh myusername
# Or you can issue the mysql commands manually
mysql -f -u myusername -p < scripts/erase.sql
]]></programlisting>
</refsection>
<refsection>
<title>How to start - Windows version</title>
<para>First, you will need to start the mysql server (normally, if mysql has been installed as a service, it is already started).</para>
<para>Still as a root user, add a mysql user</para>
<programlisting role="example"><![CDATA[
# start mysql in a windows shell window
mysql -u root -p
# The root user under mysql / windows in 'root'
# The password of the root user is the one entered during mysql installation
# Issue the following command to create the user 'myusername'
# Don't forget to replace 'myusername' by your username
CREATE USER 'myusername'@'localhost' IDENTIFIED BY 'mypassword'; GRANT
ALL PRIVILEGES ON *.* TO 'myusername'@'localhost' WITH GRANT OPTION;
QUIT
]]></programlisting>
<para>Now create and fill a database with the sudoku and transp data.</para>
<para>We also create a temporary 'glpk' username with a 'gnu' password.</para>
<programlisting role="example"><![CDATA[
# Don't forget to replace myusername by YOUR username.
# Go into the demo directory.
# Issue the mysql commands manually.
cd mysql\demos
mysql -f -u myusername -p < scripts\sudoku.sql
mysql -f -u myusername -p < scripts\transp.sql
]]></programlisting>
<para>Now, you are ready to launch the demo file:</para>
<programlisting role="example"><![CDATA[
scilab
// In Scilab, in the mysql directory, build the toolbox (once).
exec builder.sce;
// Load the toolbox (each time you need to use the mysql toolbox).
exec loader.sce;
// go into the demo directory
cd demos
// and launch the demo
exec sql.sce;
]]></programlisting>
<para>Once tested, you can clean your database:</para>
<programlisting role="example"><![CDATA[
# Don't forget to replace myusername by YOUR username.
# Go into the demo directory.
# Issue the mysql commands manually
cd mysql\demos
mysql -f -u myusername -p < scripts\erase.sql
]]></programlisting>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member><link linkend="mysql_real_connect">mysql_connect</link></member>
<member><link linkend="mysql_real_query">mysql_query</link></member>
<member><link linkend="mysql_close">mysql_close</link></member>
<member><link linkend="mysql_errno">mysql_errno</link></member>
<member><link linkend="mysql_info">mysql_info</link></member>
<member><link linkend="mysql_error">mysql_error</link></member>
<member><link linkend="mysql_result_free">mysql_result_free</link></member>
</simplelist>
</refsection>
<refsection>
<title>Authors</title>
<simplelist type="vert">
<member>Yann COLLETTE</member>
</simplelist>
</refsection>
</refentry>
|