[ic] Problem with makecat and MySQL DB :(

Joe Moschak interchange-users@interchange.redhat.com
Thu Oct 25 12:21:01 2001


I haven't closely scrutinized your whole script and the problem could be 
anywhere.  But one thing that struck me was that the second node - 
"solution-service" - of your domain name has 16 characters.  I had 
problems once using a domain with 19 characters in the second node and 
the problem seemed to go away when I used a domain name with 7 character 
in that second node.  I was using a different template than "foundation" 
when I ran into this.

Joel wrote:

>Hi !
>
>I can't create a SQL based Catalog with makecat :( There is a Problem to 
>create the DB , here is the whole dialog with makecat :
>
>--------------------------------------------
>[root@ntweb products]# /usr/lib/interchange/bin/makecat
>
>Select a short, mnemonic name for the catalog. This will be
>used to set the defaults for naming the catalog, executable,
>and directory, so you will have to type in this name frequently.
>
>NOTE: This will be the name of 'vlink' or 'tlink', the link CGI
>program. Depending on your CGI setup, it may also have the
>extension .cgi added.
>
>Only the characters [-a-zA-Z0-9_] are allowed, and it is strongly suggested
>that the catalog name be all lower case.
>
>If you are doing the demo for the first time, you might use "foundation".
>
>Catalog name? sql6
>makecat -- Interchange catalog installation program.
>
>*** We will be making a catalog named 'sql6'. ***
>
>
>Try using the UP arrow at some of the prompts -- you have the
>Term::ReadLine module installed, and Interchange may find some
>default values in your HTTP server configuration file.  You can
>cycle among them with the UP and DOWN arrows.
>
>######### BEGINNING CATALOG CONFIGURATION #########
>
>During many of the following operations, defaults are placed in
>a buffer for you. You may use the up and down arrows to toggle
>between the defaults.
>
>If you made a mistake on a *previous* entry and realize that
>in a later one, if you enter ONLY an @ sign and press return you
>should be returned to the previous step.
>
># The server name, something like: www.company.com
>#                                  www.company.com:8000
>#                                  www.company.com/~yourname
>#
>Server name? ntweb.solution-service.de
>
># The type of demo catalog to use. The standard one distributed is:
>#
>#    foundation
>#
># If you have defined your own custom template catalog,
># you can enter its name.
>#
># If you are new to Interchange, use "foundation" to start with.
>
>
>DemoType? weinshop
>
># The type of permission structure for multiple user catalogs.
># Select M for each user in own group (with interchange user in group)
>#        G for all users in group of interchange user
>#        U for all catalogs owned by interchange user (must be catuser as 
>well)
>#
>#        M is recommended, G works for most installations.
>
>
>permtype? G
>
># The user name the Interchange server runs under on this machine. This
># should not be the same as the user that runs the HTTP server (i.e.
># NOT nobody).
>#
>
>
>InterchangeUser? interch
>
>#
># The user name the catalog will be owned by.
>#
>
>
>CatUser? interch
>
># The group name the server-owned files should be set to.  This is
># only important if Interchange catalogs will be owned by multiple users
># and the group to be used is not the default for the catalog user.
>#
># Normally this is left blank unless G mode was selected above.
>#
>
>
>InterchangeGroup? interch
>
># The email address where orders for this catalog should go.
># To have a secure catalog, either this should be a local user name and
># not go over the Internet -- or use the PGP option.
>#
>
>
>MailOrderTo? interch@ntweb
>
># Where the Interchange files for this catalog will go, pages,
># products, config and all.  This should not be in HTML document
># space! Usually a 'catalogs' directory below your home directory
># works well. Remember, you will want a test catalog and an online
># catalog.
>#
>
>
>CatRoot? /var/lib/interchange/sql6
>
># The location of the normal CGI directory. This is a
># file path, not a script alias.
>#
># If all of your CGI programs must end in .cgi, this is
># should be the same as your HTML directory.
>#
>
>
>CgiDir? /var/www/cgi-bin
>
># The URL location of the CGI program, without the http://
># or server name.
>#
># http://www.virtual.com/cgi-bin/prog
>#                       ^^^^^^^^^^^^^
>#
># http://www.virtual.com/program.cgi
>#                       ^^^^^^^^^^^^
>#
>
>
>CgiUrl? /cgi-bin/sql6
>
>#
># Additional URL locations for the CGI program, as with CgiUrl.
># This is used when calling the catalog from more than one place,
># perhaps because your secure server is not the same name as the
># non-secure one.
>#
># http://www.secure.domain/secure-bin/prog
>#                         ^^^^^^^^^^^^^^^^
>#
># We set it to the name of the catalog by default to enable the
># internal HTTP server.
>#
>
>
>Aliases? /sql6
>
># The base directory for HTML for this (possibly virtual) domain.
># This is a directory path name, not a URL -- it is your HTML
># directory.
>#
>
>
>DocumentRoot? /var/www/html
>
># Where the sample HTML files (not Interchange pages) should be installed.
># There is a difference. Usually a subdirectory of your HTML directory.
>#
>
>
>SampleHtml? /var/www/html/sql6
>
># Where the image files should be copied. A directory path
># name, not a URL.
>#
>
>
>ImageDir? /var/www/html/sql6/images
>
># The URL base for the sample images. Sets the ImageDir
># directive in the catalog configuration file. This is a URL
># fragment, not a directory or file name.
>#
>#         <IMG SRC="/foundation/images/icon.gif">
>#                   ^^^^^^^^^^^^^^^^^^
>#
>
>
>ImageUrl? /sql6/images
>
>Interchange can use either UNIX- or internet-domain sockets.
>Most ISPs would prefer UNIX mode, and it is more secure.
>
>If you already have a program there, or use a common program
>and the FullURL directive, select NONE. You will then need
>to copy the program by hand or otherwise ensure its presence.
>
>(You can use the up/down arrows to toggle).
>INET or UNIX mode? UNIX
>Do you use CGIWRAP or SUEXEC? n
>Checking directories........................................mkdir 
>/var/lib/interchange/sql6
>mkdir /var/www/html/sql6
>mkdir /var/www/html/sql6/images
>done.
>Copying demo files..........................................found more to ask.
>
>Your company name: ...............................SQL6
>
>You can choose to pre-populate your Foundation template with some
>data which might be illustrative. You can always delete it later
>and replace it with your own.
>
>The types are:
>
>    tools      Construct Something, includes products, users, orders
>    reports    Marketing reports, downloadable softgoods, products, users
>    none       No data. Same as leaving blank.
>
>Sample data type?: ...............................tools
>
>Interchange has a workable internal database, but many things will
>work better (and a few worse) if you use a SQL database. Interchange
>can configure MySQL, PostgreSQL, and Oracle in a test configuration.
>
>Set to 1 if you want to use MySQL, PostgreSQL, Oracle, or DB2: ..1
>
>You can select this to use MySQL in your test catalog. Careful!
>This requires the ability to create a database named "test_foundation",
>and is highly dependent on your Perl and MySQL configuration. Don't
>be too surprised if this doesn't work.
>
>Set to 1 if you want to use MySQL: ...............1
>Database to use (will be created): ...............test_foundation
>DBI DSN to use: 
>..................................dbi:mysql:test_foundation:localhost:3306
>Username for MySQL (if any): .....................interch
>Password for MySQL (if any): .....................interch
>
>We can try and use mysqladmin to create the database in
>MySQL. In many default MySQL distributions, any user can create
>a database beginning with "test".
>
>Use the next option to add parameters. If your MySQL is password-protected
>(and you know the password) you may want to add "-u root -p".
>
>Set to 1 to create '' with mysqladmin: ...........1
>
>To create the database you may need to supply a password and
>username. To do that, add the option "-u USERNAME -p", where
>USERNAME is a MySQL user with permission to create databases.
>This is often the user "root".
>
>Extra options for creation: ......................-u interch -p interch
>
>You can select this to use PostgreSQL in your test catalog.
>This requires the ability to create a database named "test_foundation",
>and is highly dependent on your Perl and system configuration. Don't
>be too surprised if this doesn't work.
>
>Set to 1 if you want to use PostgreSQL: ..........
>
>You can select this to use Oracle in your test catalog. This requires
>that you know your Oracle DSN and that you've already created a user and
>tablespace for Interchange. You should also have the environment variables
>ORACLE_BASE, ORACLE_HOME, and ORACLE_SID set. Don't be too surprised if
>this doesn't work.
>
>Set to 1 if you want to use Oracle: ..............
>
>You can select this to use DB2 in your test catalog. Careful!
>This requires the ability to create a database named "intchg",
>and is highly dependent on your Perl and DB2 configuration. Don't
>be too surprised if this doesn't work.
>
>Set to 1 if you want to use DB2: .................
>
>You can use Interchange's companion configuration
>interface, to do upload/download of files, manipulation of
>the database, reconfiguration of the catalog, and much more.
>
>To enable the UI, you will need a "super-user" account
>name that has full access.
>
>The initial password is "pass". CHANGE IT! You can do this
>by going to the admin menu and selecting the superuser and
>then "Change password".
>
>Account name that will control this catalog: .....interch
>Administrative password: .........................pass
>Set to 1 to display demo helper features in your store: ..
>
>Found system commands to run.
>
>Since you selected the MySQL option, you need to create a database named
>"". In a default MySQL configuration, any user may create
>and drop and modify test_* databases, but some administrators disable this.
>
>run "mysqladmin -u  -p create"? y
>mysqladmin: Too few arguments to create
>
>Command returned error code 1: Datei oder Verzeichnis nicht gefunden
>
>done.
>Moving link program to /var/www/cgi-bin/sql6................done.
>Copying share/ files to /var/www/html.......................done.
>
>HTML dir copy error: Datei oder Verzeichnis nicht gefunden
>Trying to continue.
>Moving HTML files to /var/www/html/sql6.....................done.
>
>Image dir copy error: Datei oder Verzeichnis nicht gefunden
>Trying to continue.
>Moving image files to /var/www/html/sql6/images.............done.
>
>Found additional system commands to run.
> 
>We need to make some directories to store sessions, logs, and such.
> 
>run "sh 
>/var/tmp/interchange-4.8.2/var/lib/interchange/foundation/config/makedirs"? y
>/var/tmp/interchange-4.8.2/var/lib/interchange/foundation/config/makedirs: 
>/var/tmp/interchange-4.8.2/var/lib/interchange/foundation/config/makedirs: 
>Datei oder Verzeichnis nicht gefunden
> 
>Command returned error code 127: Datei oder Verzeichnis nicht gefunden
>You can install some sample data to start with in this catalog.
>This script will install the sample (tools) you selected.
> 
>run "sh 
>/var/tmp/interchange-4.8.2/var/lib/interchange/foundation/config/installsample"? 
>n
> 
>skipping 'sh 
>/var/tmp/interchange-4.8.2/var/lib/interchange/foundation/config/installsample'
>Add catalog to interchange.cfg? y
> 
>Done with installation. If my reading of your input is correct, you
>should be able to access the demo catalog with the following URL:
> 
>        http://ntweb.solution-service.de/sql6
> 
>In any case, you should get direct access at:
> 
>        http://ntweb.solution-service.de/cgi-bin/sql6
> 
>That is, after you START or RESTART the Interchange server.  8-)
>It is best done with:
> 
>        su -c "/usr/lib/interchange/bin/interchange -r" interch
> 
>For session expiration, you might want to place a line like this in your
>crontab:
> 
>44 4 * * * /usr/lib/interchange/bin/expireall -r
> 
>It will prevent the session databases from getting too large.
> 
>[root@ntweb products]#
>----------------------------------------------------------
>
>What is the Problem ? Is there a misstake with 
>DBI DSN to 
>use:..................................dbi:mysql:test_foundation:localhost:3306
>
>i do not understand why 
>Since you selected the MySQL option, you need to create a database named
>"". In a default MySQL configuration, any user may create
>and drop and modify test_* databases, but some administrators disable this.
>
>run "mysqladmin -u  -p create"? y
>mysqladmin: Too few arguments to create
>
>there are no arguments in the mysqladmin statement :( 
>
>MySQL is running on the standardport 3306 and i created the user interch  
>with all right .
>
>Thanks for help's
>
>Joel
>_______________________________________________
>interchange-users mailing list
>interchange-users@interchange.redhat.com
>http://interchange.redhat.com/mailman/listinfo/interchange-users
>
>